This repository has been archived by the owner on Mar 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (36 loc) · 1.51 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM registry.fedoraproject.org/f26-modular/boltron
# This is a container for minimal chrony client module
#
# Volumes:
# * /etc/chrony.conf - default configuration file for chrony
# Exposed ports:
# * 123 - Network Time Protocol (NTP) - used for time synchronization
# Linux capabilities:
# * SYS_TIME - Set system clock
LABEL MAINTAINER Karsten Hopp, Red Hat <[email protected]>
# Enviroment variables
ENV NAME="chronyd" RELEASE=1 ARCH=x86_64 VERSION=0
LABEL summary="A minimal chrony module" \
name="$FGC/$NAME" \
version="$VERSION" \
release="$RELEASE.$DISTTAG" \
architecture="$ARCH" \
com.redhat.component="$NAME" \
usage="docker run --cap-add SYS_TIME -d f26/chronyd" \
description="A container with the chrony client" \
io.k8s.description="A container with the chrony client" \
io.k8s.display-name="chrony" \
io.openshift.expose-services="123" \
io.openshift.tags="ntp, chronyd, time"
RUN dnf install -y --nodocs chrony && \
dnf -y clean all
# Specify it during `docker run` as parameter: "-p <host_port>:<container_port>"
EXPOSE 123
# VOLUME instruction creates unnamed volume and mounts it to the provided path,
# you can override this behavior by mounting
# a selected host directory into container: "-v <host_directory>:<container_directory>"
VOLUME /etc/chrony.conf:/etc/chrony.conf:ro
# Specify username which will be used during running container
USER 0
# Command which will start service during command `docker run`
CMD ["/usr/sbin/chronyd", "-d"]