Files
nip/k8s/Dockerfile-sslip.io-dns-server
2021-01-30 20:02:40 -08:00

34 lines
1014 B
Plaintext

#
# cunnie/sslip.io-dns-server: sslip.io DNS server Dockerfile
#
# Dockerfile of a (Golang-based) DNS server that responds to DNS queries of
# hostnames with embedded IP addresses (e.g. "169.254.169.254.example.com")
# with the IP address ("169.254.169.254). See https://sslip.io for more
# information
#
# To build:
#
# docker build . -f Dockerfile-sslip.io-dns-server -t cunnie/sslip.io-dns-server
#
# Typical start command:
#
# docker run -d --rm -p 3353:53/udp cunnie/sslip.io-dns-server
#
# To test from host:
#
# dig +short 127.0.0.1.example.com @localhost -p 3353
# 127.0.0.1
#
FROM alpine AS sslip.io
LABEL maintainer="brian.cunnie@gmail.com"
RUN wget https://github.com/cunnie/sslip.io/releases/download/2.1.2/sslip.io-dns-server-linux-amd64 -O /usr/sbin/sslip.io-dns-server; \
chmod 755 /usr/sbin/sslip.io-dns-server
ENTRYPOINT ["/usr/sbin/sslip.io-dns-server"]
# DNS listens on port 53 UDP
# The `EXPOSE` directive doesn't do much in our case. We use it for documentation.
EXPOSE 53/udp