fix: docker building
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
dcbcb1636c
commit
a85d27f9a4
1 changed files with 10 additions and 3 deletions
13
Dockerfile
13
Dockerfile
|
@ -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"]
|
||||||
|
|
Loading…
Reference in a new issue