Giter Site home page Giter Site logo

docker-chrony's Introduction

Chrony Docker Image

clock picture

Docker Cloud Build Status

Description

This docker image provides a small chrony (NTP) image which will sync the local hardware clock and provide access to an NTP time service. The image will automatically configure some sane defaults if no environment variables are provided.

Configuring At Runtime

There are a number of environment variables which can be configured when the container is started in order to change it's default behaviour:

  • CMD_CIDR - The CIDR that will allow commands to the running chrony daemon. The default value for this is 127/8 (localhost)
  • CMD_BIND - The ip address the command interface is bound to. The default value for this is 127.0.0.1 (localhost)
  • ALLOW_CIDR - The CIDR which allows NTP clients to connect and get the time. The default is to not allow external clients.
  • SYNC_RTC - Sync the realtime clock on the machine/instance the service is running. This is enabled by default.
  • NTP_SERVER - The NTP server to get the time to set from. The default is pool.ntp.org.

There is also an option to map in a pre-written configuration file to /etc/chrony.conf - if this file exists it will be used and the auto configuration setup will be skipped.

Running The Container

In order for the chrony service to operate correctly, the following command is required. Access needs to be granted to the SYS-TIME capability. The below command would enable external access to the NTP for other clients to set the time:

docker run -d --rm --cap-add SYS_TIME -e ALLOW_CIDR=0.0.0.0/0 -p 123:123/udp geoffh1977/chrony

You can place the container in interactive mode by replacing the "-d" switch with "-it".

Getting In Contact

If you find any issues with this container or want to recommend some improvements, fell free to get in contact with me or submit pull requests on github.

docker-chrony's People

Contributors

geoffh1977 avatar jinnatar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.