fix: Dockerfile did not make Docker happy

This commit is contained in:
meeg_leeto 2022-04-14 23:39:40 +01:00
parent dc5a74c6b3
commit 7220663240
1 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,5 @@
# Create the build container to compile
FROM rust:latest as builder
# Prepare container
FROM rust:slim-buster
RUN USER=root cargo new --bin lonk
WORKDIR lonk
@ -14,8 +14,6 @@ RUN rm src/*.rs
# Compile the source
COPY ./src ./src
RUN cargo build
RUN cp /lonk/target/${PROFILE:-debug}/lonk .
# Execution container
FROM scratch
COPY --from=build /lonk/target/release/lonk .
CMD ["./lonk"]
CMD ["./lonk"]