2022-12-11 16:35:50 +00:00
|
|
|
FROM rust:bullseye as builder
|
2022-12-11 15:33:16 +00:00
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY Cargo.toml /app
|
|
|
|
COPY Cargo.lock /app
|
|
|
|
COPY src /app/src
|
|
|
|
COPY templates /app/templates
|
2022-12-11 16:35:50 +00:00
|
|
|
RUN cargo build --release
|
2022-12-11 15:33:16 +00:00
|
|
|
|
2022-12-11 17:55:28 +00:00
|
|
|
FROM gcr.io/distroless/cc:latest
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/target/release/paste-frontend /app/paste-frontend
|
|
|
|
ADD templates /app/templates
|
2022-12-21 17:56:41 +00:00
|
|
|
ADD static /app/static
|
2022-12-11 17:01:05 +00:00
|
|
|
EXPOSE 8080
|
2022-12-11 17:55:28 +00:00
|
|
|
CMD ["./paste-frontend"]
|