latest
, 4.1
- Alpine 3.14, chrony 4.1
3.2
- Alpine 3.7, chrony 3.2
docker pull cwadley/alpine-chrony:latest
git pull https://github.com/cwadley/alpine-chrony.git
docker build --tag cwadley/alpine-chrony .
docker run -d \
--name chrony \
-p 123:123/udp \
--cap-add SYS_NICE \
--cap-add SYS_TIME \
--cap-add SYS_RESOURCE \
cwadley/alpine-chrony
docker run -d \
--name chrony \
-p 123:123/udp \
--cap-add SYS_NICE \
--cap-add SYS_TIME \
--cap-add SYS_RESOURCE \
-v <path_to_chrony.conf>:/etc/chrony/chrony.conf:ro \
cwadley/alpine-chrony
Chrony runs in un-detached mode in this image, which means that it does not send its logs to a file in the container, but to stdout. To view chrony logs, use docker logs chrony
.
ntpdate or sntp can be used to query the running container for the time:
ntpdate -q localhost
ntpdate -q <chrony_ip>
Both ntpdate and sntp are included in the image to debug NTP source server connections.