Skip to content

Dockerfile for OpenNTPD server running on Alpine Linux:latest.

Notifications You must be signed in to change notification settings

2infinite/openntpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

openntpd

OpenNTPD server running on Alpine Linux:latest.

Usage:

  • Openntpd required Linux capabilities SYS_TIME and SYS_NICE:
--cap-add SYS_TIME --cap-add SYS_NICE
  • Mount the container's root filesystem as read only:
--read-only=true --tmpfs /var/run:rw,noexec,nosuid,size=1m --tmpfs /var/db:rw,noexec,nosuid,size=8m

Examples:

1. Run NTP server:

docker run -d --log-driver=syslog --log-opt tag="{{.Name}}/{{.ID}}" --restart=always --name ntpd --read-only=true \
 --tmpfs /var/run:rw,noexec,nosuid,size=1m --tmpfs /var/db:rw,noexec,nosuid,size=8m \
 --cpuset-cpus="0-1" -m 64m --kernel-memory="32m" --memory-swap="128m" --cap-add SYS_TIME \
 --cap-add SYS_NICE -p 123:123/udp --security-opt no-new-privileges 2infinity/openntpd:latest

2. Run NTP client:

docker run -d --log-driver=syslog --log-opt tag="{{.Name}}/{{.ID}}" --restart=always --name ntpd --read-only=true \
 --tmpfs /var/run:rw,noexec,nosuid,size=1m --tmpfs /var/db:rw,noexec,nosuid,size=8m \
 --cpuset-cpus="0-1" -m 64m --kernel-memory="32m" --memory-swap="128m" --cap-add SYS_TIME \
 --cap-add SYS_NICE --security-opt no-new-privileges 2infinity/openntpd:latest ntpd -d -f /etc/ntp-client.conf

About

Dockerfile for OpenNTPD server running on Alpine Linux:latest.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published