-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 981 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (22 loc) · 981 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
FROM gcr.io/distroless/static-debian12:nonroot
ARG TARGETPLATFORM
ARG VERSION=dev
ARG REVISION=unknown
ARG CREATED=unknown
LABEL org.opencontainers.image.title="Sable" \
org.opencontainers.image.description="Modern, high-performance DNS server" \
org.opencontainers.image.source="https://github.com/drudge/sable" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${REVISION}" \
org.opencontainers.image.created="${CREATED}"
COPY --chown=nonroot:nonroot ${TARGETPLATFORM}/sable /usr/local/bin/sable
COPY --chown=nonroot:nonroot docker/data/ /data/
WORKDIR /data
VOLUME ["/data"]
# DNS is deliberately unprivileged inside the container. Publish it as host
# port 53 with -p 53:8053/tcp -p 53:8053/udp.
EXPOSE 8053/tcp 8053/udp 5380/tcp 5443/tcp 853/tcp 443/tcp
USER nonroot:nonroot
ENTRYPOINT ["/usr/local/bin/sable"]
CMD ["serve", "--config", "/data/sable.toml"]