diff options
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/base/Dockerfile.j2 | 6 | ||||
| -rw-r--r-- | docker/mariadb/Dockerfile.j2 | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index c9d18b296..a26ba63fc 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -407,8 +407,9 @@ COPY start.sh /usr/local/bin/kolla_start COPY sudoers /etc/sudoers COPY curlrc /root/.curlrc -{% block dumb_init_installation %} +{% if use_dumb_init %} +{% block dumb_init_installation %} {% if base_arch == 'x86_64' %} RUN curl -sSL https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_{{debian_arch}} -o /usr/local/bin/dumb-init \ @@ -428,10 +429,11 @@ RUN curl -sSL http://deb.debian.org/debian/pool/main/d/dumb-init/{{dumb_init_pac && rm data.tar.xz {{dumb_init_package_name}} {% endif %} +{% endblock %} ENTRYPOINT ["dumb-init", "--single-child", "--"] -{% 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 \ diff --git a/docker/mariadb/Dockerfile.j2 b/docker/mariadb/Dockerfile.j2 index cc7b27194..4e2f57f48 100644 --- a/docker/mariadb/Dockerfile.j2 +++ b/docker/mariadb/Dockerfile.j2 @@ -52,15 +52,18 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start \ RUN mkdir -p /var/run/mysqld && chown mysql /var/run/mysqld && chmod 755 /var/run/mysqld {% endif %} +{% if use_dumb_init %} {% block mariadb_entrypoint %} # NOTE(mgoddard): Override the dumb-init arguments to avoid passing # --single-child. This does not play well with mysqld_safe, which ignores # SIGTERM, meaning Docker needs to forcibly kill the container to stop it. # Without --single-child, the TERM signal is sent to all subprocesses, # including mysqld. -ENTRYPOINT ["dumb-init"] + +ENTRYPOINT ["dumb-init", "--"] CMD ["kolla_start"] {% endblock %} +{% endif %} {% block mariadb_footer %}{% endblock %} {% block footer %}{% endblock %} |
