kolla/docker/chrony/Dockerfile.j2
Jeffrey Zhang 86a5c8cb79 Add chrony docker image
Partially-implements: blueprint add-chrony-service
Change-Id: If8045c62656ffc0090d0c02ca0fbe58ab8c5f29f
2016-11-04 07:19:11 +00:00

24 lines
728 B
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block chrony_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% set chrony_packages = ['chrony'] %}
{% if base_distro in ['ubuntu', 'debian'] %}
# Ubuntu use _chrony username to use unified running user with RHEL system
RUN useradd --user-group --create-home --home-dir /var/lib/chrony chrony
{% endif %}
{{ macros.install_packages(chrony_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& usermod -a -G kolla chrony
{% block chrony_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}