region-restriction-checker/Dockerfile

23 lines
497 B
Docker
Raw Normal View History

2022-11-23 05:40:44 +00:00
FROM rustlang/rust:nightly-slim AS builder
WORKDIR /app/
COPY . .
2022-11-23 08:09:10 +00:00
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 05:40:44 +00:00
2022-11-23 07:05:08 +00:00
FROM debian:stable-slim
2022-11-23 05:40:44 +00:00
2022-11-23 08:09:10 +00:00
RUN apt-get update && \
apt-get install -y ca-certificates && \
rm -rf /var/lib/apt/lists/*
2022-11-23 05:40:44 +00:00
WORKDIR /app/
2022-11-23 08:09:10 +00:00
COPY --from=builder /app/region-restriction-checker .
2022-11-23 05:40:44 +00:00
2022-11-23 07:20:16 +00:00
CMD ["/app/region-restriction-checker"]