From 79851d7929027050d0d1e76aaa28e83c141dcc55 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Tue, 13 Aug 2019 07:55:58 +0000 Subject: Build images with healthcheck scripts for core services blueprint container-health-check Now docker supports healthcheck directive[0] in Dockerfile, which is helpful for checking container aliveness. Base for this patch were healthcheck scripts from tripleo[1]. [0] https://docs.docker.com/engine/reference/builder/#healthcheck [1] https://github.com/openstack/tripleo-common/tree/master/healthcheck Change-Id: Ifc32713cd4d6b45c74855c0ebf5bb65784701d44 --- docker/base/Dockerfile.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docker/base/Dockerfile.j2') diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 590bec89e..793471e77 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -484,6 +484,15 @@ ENTRYPOINT ["dumb-init", "--single-child", "--"] {% endif %} +{% if docker_healthchecks %} +{% block healthcheck_installation %} + +COPY healthcheck_curl healthcheck_filemod healthcheck_listen healthcheck_port healthcheck_socket /usr/local/bin/ +RUN chmod 755 /usr/local/bin/healthcheck_* + +{% endblock %} +{% endif %} + RUN touch /usr/local/bin/kolla_extend_start \ && chmod 755 /usr/local/bin/kolla_start /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_set_configs /usr/local/bin/kolla_copy_cacerts \ && chmod 440 /etc/sudoers \ -- cgit v1.2.3