Skip to content

Commit

Permalink
Merge pull request #105 from vadorovsky/fix-image-build
Browse files Browse the repository at this point in the history
docker: cargo: Always use release profile
  • Loading branch information
vadorovsky authored Nov 30, 2021
2 parents 384b8f4 + 9f65321 commit d049c18
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ RUN curl -Lso linux.tar.xz \
# Prepare lockc sources and build it.
WORKDIR /usr/local/src/lockc
COPY . ./
RUN cargo build
RUN cargo build --release

FROM registry.opensuse.org/opensuse/leap:15.3 AS lockcd
# runc links those libraries dynamically
RUN zypper --non-interactive install \
libseccomp2 \
libselinux1 \
&& zypper clean
ARG PROFILE=debug
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/src/lockc/target/release/lockcd /usr/bin/lockcd
ENTRYPOINT ["/usr/bin/lockcd"]

0 comments on commit d049c18

Please sign in to comment.