Files
nsupdate/docker/Dockerfile
Christian Busch 2cc6bad069
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 35s
Run script in conatiner as unrivileged user.
2026-04-26 16:57:28 +02:00

37 lines
957 B
Docker
Executable File

FROM alpine:latest
ENV TZ="UTC"
ENV SCHEDULE="* * * * *"
ENV PUID=1000
ENV PGID=1000
## Configure runtime variables for nsupdate
ENV NSUPDATE_CONFD_DIR="/config"
ENV NSUPDATE_LOG_DIR="/log"
## Install requirements
RUN apk update
RUN apk add --no-cache git curl libxml2-utils tzdata jq
# Read timezone from server, so in docker-compose you can change TZ
RUN ln -sf "/usr/share/zoneinfo/${TZ}" /etc/localtime && \
echo "${TZ}" > /etc/timezone && date
# Cache Bust upon new commits
ADD https://api.github.com/repos/chrisb86/nsupdate/git/refs/heads/main /.git-hashref
COPY nsupdate.sh /usr/local/bin/nsupdate.sh
RUN chmod +x /usr/local/bin/nsupdate.sh
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# Create volume directories (ownership will be set at runtime)
RUN mkdir -p /config /log
## Start crond
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
CMD [ "crond", "-f" ]
VOLUME /config
VOLUME /log