diff --git a/Dockerfile b/Dockerfile index 03a2778..35b5cf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM alpine +FROM alpine:latest MAINTAINER support@tutum.co -ADD ntpd /etc/periodic/daily/ -CMD ["sh", "-c", "/etc/periodic/daily/ntpd && crond -f"] \ No newline at end of file + +ADD ntpd /etc/periodic/daily/ntpd +ADD run.sh /run.sh +CMD ["/run.sh"] diff --git a/README.md b/README.md index 468bc8a..55f5aaa 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ Keeps the host datetime in sync - ## Usage - docker run -d --privileged tutum/ntpdate diff --git a/ntpd b/ntpd index 5d525c4..68c2113 100755 --- a/ntpd +++ b/ntpd @@ -1,2 +1,2 @@ #!/bin/sh -ntpd -d -q -n -p ntp.ubuntu.com \ No newline at end of file +ntpd -d -q -n -p 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..1abddc1 --- /dev/null +++ b/run.sh @@ -0,0 +1,3 @@ +#!/bin/sh +/etc/periodic/daily/ntpd +exec crond -f