aboutsummaryrefslogtreecommitdiff
path: root/docker/base
diff options
context:
space:
mode:
authorRabi Mishra <ramishra@redhat.com>2018-10-24 11:24:07 +0530
committerRabi Mishra <ramishra@redhat.com>2018-11-20 14:48:12 +0530
commitb06d8387f50ac9c536941ffddb00c5bdb45753b6 (patch)
treee3668848a0a3cac0477c4cfcd9dec3299240d144 /docker/base
parentf613ff8a548accee65bd86209e4683539b66ffdb (diff)
downloadkolla-b06d8387f50ac9c536941ffddb00c5bdb45753b6.tar.gz
kolla-b06d8387f50ac9c536941ffddb00c5bdb45753b6.zip
Use dumb-init with --single-child
We would probably like to forward signals only to the direct child which in turn takes care its children and not to all worker child processes. Change-Id: Id91ebb8b0ecc43946845de386350af0536dd661f Related-Bug: #1799642
Diffstat (limited to 'docker/base')
-rw-r--r--docker/base/Dockerfile.j29
1 files changed, 5 insertions, 4 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index 6ce2425a3..becc02652 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -399,8 +399,7 @@ COPY curlrc /root/.curlrc
{% if base_arch == 'x86_64' %}
RUN curl -sSL https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 -o /usr/local/bin/dumb-init \
- && chmod +x /usr/local/bin/dumb-init \
- && sed -i 's|#!|#!/usr/local/bin/dumb-init |' /usr/local/bin/kolla_start
+ && chmod +x /usr/local/bin/dumb-init
{% else %}
@@ -410,10 +409,12 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python get-pip.py \
&& rm get-pip.py \
&& pip --no-cache-dir install --prefix='/usr/local' dumb-init==1.1.3 \
- && chmod +x /usr/local/bin/dumb-init \
- && sed -i 's|#!|#!/usr/local/bin/dumb-init |' /usr/local/bin/kolla_start
+ && chmod +x /usr/local/bin/dumb-init
{% endif %}
+
+ENTRYPOINT ["dumb-init", "--single-child", "--"]
+
{% endblock %}
RUN touch /usr/local/bin/kolla_extend_start \