fix: docker building
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
hexlocation pc 2024-07-13 00:47:51 +02:00
parent dcbcb1636c
commit a85d27f9a4

View file

@ -3,14 +3,21 @@ FROM rust:1.79 as compile
WORKDIR /build WORKDIR /build
COPY . . COPY . .
RUN rustup target add x86_64-unknown-linux-musl
RUN rm -Rf /build/Cargo.lock RUN rm -Rf /build/Cargo.lock
RUN cargo update RUN cargo update
RUN cargo build --release RUN cargo build --release
FROM gcr.io/distroless/static-debian12 RUN ls /build/target
FROM gcr.io/distroless/cc
WORKDIR /app WORKDIR /app
COPY --from=compile /build/target/release/iwakura-web /bin/server COPY --from=compile /build/target/release/iwakura-web /app/
COPY --from=compile /build/assets /app/assets COPY --from=compile /build/assets /app/assets
CMD ["/bin/server"] COPY --from=compile /build/templates /app/templates
CMD ["/app/iwakura-web"]