2023-10-10 18:57:40 +05:30
|
|
|
FROM rust:bookworm as builder
|
2022-12-11 21:03:16 +05:30
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY Cargo.toml /app
|
|
|
|
COPY Cargo.lock /app
|
|
|
|
COPY src /app/src
|
|
|
|
COPY templates /app/templates
|
2022-12-11 22:05:50 +05:30
|
|
|
RUN cargo build --release
|
2022-12-11 21:03:16 +05:30
|
|
|
|
2023-10-10 18:57:40 +05:30
|
|
|
FROM gcr.io/distroless/cc-debian12:latest
|
2022-12-11 23:25:28 +05:30
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/target/release/paste-frontend /app/paste-frontend
|
|
|
|
ADD templates /app/templates
|
2022-12-21 23:26:41 +05:30
|
|
|
ADD static /app/static
|
2022-12-11 22:31:05 +05:30
|
|
|
EXPOSE 8080
|
2022-12-11 23:25:28 +05:30
|
|
|
CMD ["./paste-frontend"]
|