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:
@@ -6,11 +6,13 @@ RUN apk add musl-dev
|
||||
RUN USER=root cargo new --bin cup
|
||||
WORKDIR /cup
|
||||
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY Cargo.toml Cargo.lock .
|
||||
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
|
||||
|
||||
FROM scratch
|
||||
|
||||
Reference in New Issue
Block a user