m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-13 07:33:48 -05:00

FINALLY fix Dockerfile

This commit is contained in:
Sergio
2024-07-11 12:27:02 +03:00
parent ac8f97fbcd
commit bee808e577

View File

@@ -6,11 +6,13 @@ RUN apk add musl-dev
RUN USER=root cargo new --bin cup RUN USER=root cargo new --bin cup
WORKDIR /cup WORKDIR /cup
COPY Cargo.toml Cargo.lock ./ COPY Cargo.toml Cargo.lock .
RUN cargo build --release RUN cargo build --release
RUN rm src/*.rs RUN rm -rf src/
COPY src ./src COPY src src
# This is a very bad workaround, but cargo only triggers a rebuild this way for some reason
RUN printf "\n" >> src/main.rs
RUN cargo build --release RUN cargo build --release
FROM scratch FROM scratch