-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (18 loc) · 835 Bytes
/
Dockerfile
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
# syntax=docker/dockerfile:1
ARG ALPINE_VERSION=3.19
ARG RUST_VERSION=1.76.0
FROM --platform=$BUILDPLATFORM docker.io/library/rust:${RUST_VERSION}-alpine${ALPINE_VERSION} as builder
RUN apk add --no-cache musl-dev=1.2.4_git20230717-r4 \
openssl-dev=3.1.4-r5 \
openssl-libs-static=3.1.4-r5
COPY . /app
WORKDIR /app
RUN cargo build --release
FROM scratch AS runtime
LABEL org.opencontainers.image.title="netcheck" \
org.opencontainers.image.description="A tool to check network availability" \
org.opencontainers.image.authors="hello@milescroxford.com" \
org.opencontainers.image.version="0.0.1"
COPY --from=builder /app/target/release/netcheck /netcheck
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
CMD ["./netcheck"]