From 9f65321b4935e4c06b90094ba4e57e51131579e0 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Tue, 30 Nov 2021 13:20:55 +0100 Subject: [PATCH] docker: cargo: Always use release profile 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 --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b938498..c36dc5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,7 @@ 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 @@ -47,7 +47,6 @@ 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"]