summaryrefslogtreecommitdiff
path: root/docker/mariadb
diff options
context:
space:
mode:
authorRabi Mishra <ramishra@redhat.com>2019-03-29 07:45:19 +0530
committerMark Goddard <mark@stackhpc.com>2019-04-03 08:27:45 +0000
commitfb4cb9efda5a522ba0d837047385b61275d09150 (patch)
tree7af84476e2d6a59c54f38a63a0e3eac9db6b3e69 /docker/mariadb
parent636fce475b7b1525f4ad353d2a0740f784d22aad (diff)
downloadkolla-fb4cb9efda5a522ba0d837047385b61275d09150.tar.gz
kolla-fb4cb9efda5a522ba0d837047385b61275d09150.zip
Add config option use_dumb_init to add it to container images
Usage of dumb-init can also be disabled from cli with `--nouse-dumb-init` when building images. Also moves ENTRYPOINT outside of dumb_init_installation block. Change-Id: Id32d54fc9913b83cf121ede5a5e265e0772062ae Related-Bug: #1821970
Diffstat (limited to 'docker/mariadb')
-rw-r--r--docker/mariadb/Dockerfile.j25
1 files changed, 4 insertions, 1 deletions
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 %}