Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xZero707 committed Apr 20, 2020
0 parents commit 5023063
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**.gitkeep
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM nlss/base-alpine

WORKDIR "/chrony"

RUN apk add --update --upgrade --no-cache chrony
COPY ["rootfs", "/"]

HEALTHCHECK --interval=30s --timeout=5s CMD chronyc tracking > /dev/null

VOLUME ["/chrony/data"]

EXPOSE 123/UDP
3 changes: 3 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM local/chronyd

RUN apk add --update --no-cache nano bash
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 N0rthern L1ghts

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerized chrony server
7 changes: 7 additions & 0 deletions build-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
set -e

# Build development friendly image with addition of nano and bash.

docker build -t local/nlss-chronyd .
docker build -t local/nlss-chronyd:dev . -f Dockerfile.dev
1 change: 1 addition & 0 deletions rootfs/chrony/chrony.conf
Empty file.
17 changes: 17 additions & 0 deletions rootfs/etc/chrony/chrony.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# General
pool pool.ntp.org iburst
initstepslew 10 pool.ntp.org
makestep 1.0 3
#leapsectz right/UTC
driftfile /chrony/data/chrony.drift
dumponexit
dumpdir /chrony/data/dump
rtcsync

# Server
allow
clientloglimit 100000000
ratelimit interval 3 burst 8 leak 2

# NIC needs support (ethtool -T | grep 'STAMP')
hwtimestamp *
1 change: 1 addition & 0 deletions rootfs/etc/fix-attrs.d/10-user-home
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/chronyd true chrony:chrony 2770 2770
2 changes: 2 additions & 0 deletions rootfs/etc/services.d/chronyd/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/execlineb -P
/usr/sbin/chronyd -d -m -u chrony

0 comments on commit 5023063

Please sign in to comment.