25 linhas
774 B
Docker
25 linhas
774 B
Docker
# Interweb Angola dynamic DNS in a small container.
|
|
#
|
|
# docker build -t interweb-ao-ddns .
|
|
# docker run -d --restart unless-stopped --name ddns \
|
|
# -e INTERWEB_API_KEY=prod_... -e DDNS_DOMAIN=example.co.ao -e DDNS_NAME=home \
|
|
# interweb-ao-ddns
|
|
#
|
|
# For AAAA records the container needs IPv6: add --network host.
|
|
FROM alpine:3.20
|
|
|
|
RUN apk add --no-cache curl ca-certificates \
|
|
&& adduser -D -H -s /sbin/nologin ddns
|
|
|
|
COPY ddns.sh /usr/local/bin/ddns
|
|
RUN chmod 755 /usr/local/bin/ddns
|
|
|
|
ENV DDNS_STATE_DIR=/tmp/ddns \
|
|
DDNS_INTERVAL=300
|
|
|
|
USER ddns
|
|
LABEL org.opencontainers.image.title="Interweb Angola dynamic DNS" \
|
|
org.opencontainers.image.version="1.0.1" \
|
|
org.opencontainers.image.licenses="MIT"
|
|
|
|
ENTRYPOINT ["/usr/local/bin/ddns", "--loop"]
|