Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ RUN curl -Lso linux.tar.xz \
WORKDIR /usr/local/src/lockc
COPY . ./
ARG profile=release
RUN if [[ "$profile" == "debug" ]]; then cargo build; else cargo build --profile ${profile}; fi
RUN --mount=type=cache,target=/.root/cargo/registry \
--mount=type=cache,target=/usr/local/src/lockc/target \
if [[ "$profile" == "debug" ]]; then cargo build; else cargo build --profile ${profile}; fi \
&& cp target/${profile}/lockcd /usr/local/bin/lockcd

FROM registry.opensuse.org/opensuse/leap:15.3 AS lockcd
# runc links those libraries dynamically
Expand All @@ -54,5 +57,5 @@ RUN zypper --non-interactive install \
ARG profile=release
RUN if [[ "$profile" == "debug" ]]; then zypper --non-interactive install gdb lldb; fi
COPY --from=build /usr/local/src/linux/tools/bpf/bpftool/bpftool /usr/sbin/bpftool
COPY --from=build /usr/local/src/lockc/target/${profile}/lockcd /usr/bin/lockcd
COPY --from=build /usr/local/bin/lockcd /usr/bin/lockcd
ENTRYPOINT ["/usr/bin/lockcd"]