-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile.prod
More file actions
27 lines (24 loc) · 721 Bytes
/
Dockerfile.prod
File metadata and controls
27 lines (24 loc) · 721 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
# syntax=docker/dockerfile:1.4
FROM clux/muslrust:stable AS builder
WORKDIR /app
COPY Cargo.toml Cargo.lock* ./
COPY build.rs build.rs
COPY proto proto
COPY src src
COPY templates templates
COPY static static
COPY config.json config.json
# Build a statically linked binary to remove glibc runtime dependency.
RUN rustup target add x86_64-unknown-linux-musl && \
cargo build --release --target x86_64-unknown-linux-musl
FROM gcr.io/distroless/cc
WORKDIR /app
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/status /status
COPY templates templates
COPY static static
COPY config.json config.json
ENV RUST_LOG=info
EXPOSE 5000
USER 0
ENTRYPOINT ["/status"]
CMD ["serve", "--port", "5000", "--with-ui"]