docker-ntp icon indicating copy to clipboard operation
docker-ntp copied to clipboard

Feature request: Add ENV variable for setting minpoll and maxpoll or let user provide a custom chrony.conf

Open viaujoc opened this issue 6 months ago • 0 comments

Hi!

I am running this great container on my network. I find that the minpoll of 64 seconds (value 6) and the maxpoll of 1024 seconds (value 10) (about 17 hours) are too frequent. Please add two ENV variables to let the user set those parameters according to their needs.

Alternatively, it would be nice to be able to provide our own chrony.conf through a volume. The startup script would have 2 conditions:

Condition 1: /config/chrony.conf exists and is copied to /etc/chrony/chrony.conf. Nothing else is done in the config file by the startup script. The NTP_SERVERS and NOCLIENTLOG env variables are ignored. -- it does not have to be /config, but it should be something else than /etc/chrony to make sure that the custom config file is copied every time the container starts.

Condition 2: No custom chrony.conf is provided. The startup script behaves like it does today and dynamically builds chrony.conf

It is currently possible to supply a custom configuration file and does not get overwritten at the container start by mounting a read-only volume to /etc/chrony that contains a chrony.conf file. It does work but the startup script throws errors in the container log: /opt/startup.sh: line XX: can't create /etc/chrony/chrony.conf: Read-only file system

Thanks!

viaujoc avatar Apr 26 '25 06:04 viaujoc