summaryrefslogtreecommitdiff
path: root/docker/base
diff options
context:
space:
mode:
authorRabi Mishra <ramishra@redhat.com>2019-03-29 07:45:19 +0530
committerEmilien Macchi <emilien@redhat.com>2019-04-13 22:16:39 +0000
commit666d800b0e1d12e653eae3d11aee1a0b2433fbc7 (patch)
treef539f7110276dbb5848e916bf9a583dfdd343933 /docker/base
parenta64450f452671e61afe2eecb404eca5443f5a190 (diff)
downloadkolla-666d800b0e1d12e653eae3d11aee1a0b2433fbc7.tar.gz
kolla-666d800b0e1d12e653eae3d11aee1a0b2433fbc7.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 (cherry picked from commit fb4cb9efda5a522ba0d837047385b61275d09150)
Diffstat (limited to 'docker/base')
-rw-r--r--docker/base/Dockerfile.j26
1 files changed, 4 insertions, 2 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 \