FROM alpine
RUN apk update
RUN apk add openntpd
RUN echo "servers pool.ntp.org" > /etc/ntpd.conf
RUN mkdir -p /var/empty
ENTRYPOINT ["ntpd"]
CMD ["-d", "-f", "/etc/ntpd.conf", "-s"]
Because this sets the system time, it needs to run as a privileged user:
docker run --privileged craftonixaa/ntp-no-rtc
Content type
Image
Digest
Size
3.8 MB
Last updated
over 6 years ago
docker pull craftonixaa/ntp-no-rtc