Skip to content

Commit 07ca4dd

Browse files
committed
test: run binary without copying to new layer
1 parent 3d7afc2 commit 07ca4dd

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ RUN apt-get install musl-tools -y
2626
ENV CC_x86_64_unknown_linux_musl="x86_64-linux-musl-gcc"
2727
RUN cargo build --release --target x86_64-unknown-linux-musl
2828

29+
# Test without smaller image
30+
ENV RUST_BACKTRACE="full"
31+
32+
ENTRYPOINT [ "/app/target/x86_64-unknown-linux-musl/release/dd_rpc" ]
33+
2934
# Create a minimal image with the compiled binary
3035
#FROM gcr.io/distroless/static AS runtime
3136
#FROM scratch
32-
FROM debian:bookworm-slim
33-
WORKDIR /app
34-
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/dd_rpc /app/dd_rpc
35-
36-
ENV RUST_BACKTRACE="full"
37+
# FROM debian:bookworm-slim
38+
# WORKDIR /app
39+
# COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/dd_rpc /app/dd_rpc
3740

38-
ENTRYPOINT ["/app/dd_rpc"]
41+
#ENTRYPOINT ["/app/dd_rpc"]

0 commit comments

Comments
 (0)