diff --git a/Dockerfile b/Dockerfile index 890fc4f..1bbc441 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,21 @@ FROM rust:1.79 as compile WORKDIR /build COPY . . + +RUN rustup target add x86_64-unknown-linux-musl + RUN rm -Rf /build/Cargo.lock RUN cargo update RUN cargo build --release -FROM gcr.io/distroless/static-debian12 +RUN ls /build/target + +FROM gcr.io/distroless/cc 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 -CMD ["/bin/server"] +COPY --from=compile /build/templates /app/templates + +CMD ["/app/iwakura-web"]