theohbrothers/docker-chrony

By theohbrothers

Updated over 1 year ago

Dockerized chrony based on alpine 🐳

Image
0

10K+

theohbrothers/docker-chrony repository overview

docker-chrony

github-actions github-release docker-image-size

Dockerized chrony based on alpine.

Tags

TagDockerfile Build Context
:4.6, :latestView
:4.5View
:4.3View
:4.2View
:4.1View
:4.0View
:3.5.1View

Usage

No NTS
# Create a custom config file if needed. See: https://chrony.tuxfamily.org/doc/v4.0/chrony.conf.html#examples
cat - > chrony.conf <<'EOF'
pool pool.ntp.org iburst
initstepslew 10 pool.ntp.org
driftfile /var/lib/chrony/chrony.drift
makestep 1.0 3
rtcsync
allow all
EOF

# Start server
docker run -it -p 123:123/udp -v $(pwd)/chrony.conf:/etc/chrony/chrony.conf:ro theohbrothers/docker-chrony:v4.2

# Start server (sync the system clock)
docker run -it --cap-add SYS_TIME -p 123:123/udp -v $(pwd)/chrony.conf:/etc/chrony/chrony.conf:ro theohbrothers/docker-chrony:v4.2 -d
Upstream NTS
# Create a custom config file if needed. See: https://chrony.tuxfamily.org/doc/v4.0/chrony.conf.html#examples
cat - > chrony.conf <<'EOF'
server time.cloudflare.com iburst nts
initstepslew 10 time.cloudflare.com
driftfile /var/lib/chrony/chrony.drift
makestep 1.0 3
rtcsync
allow all
EOF

# Start server
docker run -it -p 123:123/udp -v $(pwd)/chrony.conf:/etc/chrony/chrony.conf:ro theohbrothers/docker-chrony:v4.2

# Start server (sync the system clock)
docker run -it --cap-add SYS_TIME -p 123:123/udp -v $(pwd)/chrony.conf:/etc/chrony/chrony.conf:ro theohbrothers/docker-chrony:v4.2 -d
From local system clock
# Create a custom config file if needed. See: https://chrony.tuxfamily.org/doc/v4.0/chrony.conf.html#examples
cat - > chrony.conf <<'EOF'
initstepslew 10 client1 client3 client6
driftfile /var/lib/chrony/chrony.drift
local stratum 8
rtcsync
allow all
EOF

# Start server
docker run -it -p 123:123/udp -v $(pwd)/chrony.conf:/etc/chrony/chrony.conf:ro theohbrothers/docker-chrony:v4.2

Development

Requires Windows powershell or pwsh.

# Install Generate-DockerImageVariants module: https://github.com/theohbrothers/Generate-DockerImageVariants
Install-Module -Name Generate-DockerImageVariants -Repository PSGallery -Scope CurrentUser -Force -Verbose

# Edit ./generate templates

# Generate the variants
Generate-DockerImageVariants .

Tag summary

Content type

Image

Digest

sha256:089b18ca7

Size

6.4 MB

Last updated

over 1 year ago

docker pull theohbrothers/docker-chrony