Initial commit
This commit is contained in:
commit
96d3cf1797
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM alpine:3
|
||||
RUN apk add openntpd && mkdir -m 1777 /var/empty/tmp
|
||||
COPY ./ntpd.conf /etc/ntpd.conf
|
||||
EXPOSE 123/udp
|
||||
ENTRYPOINT ["/usr/sbin/ntpd", "-d", "-f", "/etc/ntpd.conf"]
|
31
README.md
Normal file
31
README.md
Normal file
@ -0,0 +1,31 @@
|
||||
# OpenNTPD with Swedish Netnod NTP-servers
|
||||
This is a simple and small OpenNTPD container pre-configured with NTP-servers
|
||||
from the Swedish Netnod. All servers have the same weight, so it should work
|
||||
equally well wherever you live in Sweden.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Usage
|
||||
|
||||
### As a client
|
||||
To simply use it as a client to synchronize your local computer clock, just
|
||||
run it and add the capability to change the clock. For example:
|
||||
|
||||
docker run -d --name ntp --cap-add SYS_TIME --restart=always swedish-ntp
|
||||
|
||||
### As a server
|
||||
You need to publish UDP port 123 to be able to connect to the OpenNTPD daemon.
|
||||
For example:
|
||||
|
||||
docker run -d --name ntp --cap-add SYS_TIME --publish 123:123/udp --restart=always swedish-ntp
|
||||
|
||||
# Additional information
|
||||
For more information about Netnod NTP servers, see [Netnod's NTP
|
||||
service](https://www.netnod.se/ntp/network-time-protocol-%28ntp%29-services-).
|
||||
Please note that I am not in any way affiliated with Netnod.
|
||||
|
||||
For more information about OpenNTPD, see [OpenNTPD](http://www.openntpd.org/).
|
13
ntpd.conf
Normal file
13
ntpd.conf
Normal file
@ -0,0 +1,13 @@
|
||||
listen on *
|
||||
|
||||
server mmo1.ntp.se weight 1
|
||||
server mmo2.ntp.se weight 1
|
||||
server gbg1.ntp.se weight 1
|
||||
server gbg2.ntp.se weight 1
|
||||
server sth1.ntp.se weight 1
|
||||
server sth2.ntp.se weight 1
|
||||
server svl1.ntp.se weight 1
|
||||
server svl2.ntp.se weight 1
|
||||
|
||||
sensor *
|
||||
constraints from "https://www.google.se"
|
Loading…
x
Reference in New Issue
Block a user