-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
39 additions
and
40 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM alpine:latest | ||
|
||
ENV TZ "UTC" | ||
ENV SCHEDULE "* * * * *" | ||
|
||
## 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 | ||
|
||
# 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 | ||
|
||
COPY ../nsupdate.sh /usr/local/bin/nsupdate.sh | ||
RUN chmod +x /usr/local/bin/nsupdate.sh | ||
|
||
COPY docker/entrypoint.sh / | ||
RUN chmod +x /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
VOLUME /config | ||
VOLUME /log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /bin/sh | ||
|
||
echo "${SCHEDULE} sh nsupdate.sh" >> /etc/crontabs/root | ||
crond -l 2 -f > /dev/stdout 2> /dev/stderr & |