fix: Dockerfile did not make Docker happy
This commit is contained in:
parent
dc5a74c6b3
commit
7220663240
10
Dockerfile
10
Dockerfile
|
@ -1,5 +1,5 @@
|
||||||
# Create the build container to compile
|
# Prepare container
|
||||||
FROM rust:latest as builder
|
FROM rust:slim-buster
|
||||||
RUN USER=root cargo new --bin lonk
|
RUN USER=root cargo new --bin lonk
|
||||||
WORKDIR lonk
|
WORKDIR lonk
|
||||||
|
|
||||||
|
@ -14,8 +14,6 @@ RUN rm src/*.rs
|
||||||
# Compile the source
|
# Compile the source
|
||||||
COPY ./src ./src
|
COPY ./src ./src
|
||||||
RUN cargo build
|
RUN cargo build
|
||||||
|
RUN cp /lonk/target/${PROFILE:-debug}/lonk .
|
||||||
|
|
||||||
# Execution container
|
CMD ["./lonk"]
|
||||||
FROM scratch
|
|
||||||
COPY --from=build /lonk/target/release/lonk .
|
|
||||||
CMD ["./lonk"]
|
|
Loading…
Reference in New Issue