2022-11-23 11:10:44 +05:30
|
|
|
FROM rustlang/rust:nightly-slim AS builder
|
|
|
|
|
|
|
|
WORKDIR /app/
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2022-11-23 13:39:10 +05:30
|
|
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
|
|
|
--mount=type=cache,target=/app/target/ \
|
|
|
|
cargo build --release && \
|
|
|
|
cp target/release/region-restriction-checker .
|
2022-11-23 11:10:44 +05:30
|
|
|
|
2022-11-23 12:35:08 +05:30
|
|
|
FROM debian:stable-slim
|
2022-11-23 11:10:44 +05:30
|
|
|
|
2022-11-23 13:39:10 +05:30
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y ca-certificates && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2022-11-23 11:10:44 +05:30
|
|
|
WORKDIR /app/
|
|
|
|
|
2022-11-23 13:39:10 +05:30
|
|
|
COPY --from=builder /app/region-restriction-checker .
|
2022-11-23 11:10:44 +05:30
|
|
|
|
2022-11-23 12:50:16 +05:30
|
|
|
CMD ["/app/region-restriction-checker"]
|