iwakuweb/Dockerfile

24 lines
422 B
Docker
Raw Permalink Normal View History

2024-07-12 23:51:44 +02:00
FROM rust:1.79 as compile
2024-07-12 21:56:23 +02:00
WORKDIR /build
COPY . .
2024-07-13 00:47:51 +02:00
RUN rustup target add x86_64-unknown-linux-musl
2024-07-12 23:32:35 +02:00
RUN rm -Rf /build/Cargo.lock
2024-07-12 23:51:44 +02:00
RUN cargo update
2024-07-12 21:56:23 +02:00
RUN cargo build --release
2024-07-13 00:47:51 +02:00
RUN ls /build/target
FROM gcr.io/distroless/cc
2024-07-12 21:56:23 +02:00
WORKDIR /app
2024-07-13 00:47:51 +02:00
COPY --from=compile /build/target/release/iwakura-web /app/
2024-07-12 21:56:23 +02:00
COPY --from=compile /build/assets /app/assets
2024-07-13 00:47:51 +02:00
COPY --from=compile /build/templates /app/templates
CMD ["/app/iwakura-web"]