Skip to content

Commit

Permalink
docker: cargo: Always use release profile
Browse files Browse the repository at this point in the history
Our previous attempt to pick a profile (debug or release) didn't work
and we don't support running any debuggers in our containers. So let's
just stick to release profile for now, that should fix tagged builds.

Signed-off-by: Michal Rostecki <[email protected]>
  • Loading branch information
vadorovsky committed Nov 30, 2021
1 parent 384b8f4 commit 9f65321
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 9f65321

Please sign in to comment.