-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (17 loc) · 680 Bytes
/
Dockerfile
File metadata and controls
30 lines (17 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM rust:slim-buster AS builder
RUN apt-get update && apt-get install --no-install-recommends -y perl make && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/omnisette-server/
COPY Cargo.* ./
COPY src ./src
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
RUN cargo build --release
FROM debian:stable-slim AS runtime
RUN apt-get update && apt-get install --no-install-recommends -y unzip curl ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/omnisette-server/
COPY docker-entrypoint.sh ./
COPY --from=builder /opt/omnisette-server/target/release/omnisette-server ./
ENTRYPOINT [ "./docker-entrypoint.sh" ]