diff options
| author | Martin André <m.andre@redhat.com> | 2017-04-07 11:35:16 +0200 |
|---|---|---|
| committer | Martin André <m.andre@redhat.com> | 2017-05-11 17:54:17 +0200 |
| commit | f9e634ca6b5e6aa33369858e73433409fe10dd2f (patch) | |
| tree | 0c2cbe440a2076199fcf6ad632575a3687f318ac /docker/base | |
| parent | 2e438918384447d52c958d61b9a377c375ec932b (diff) | |
| download | kolla-f9e634ca6b5e6aa33369858e73433409fe10dd2f.tar.gz kolla-f9e634ca6b5e6aa33369858e73433409fe10dd2f.zip | |
Move shebang customization into jinja2 block
By setting up the shebang inside a jinja2 block, this allows the
operator to use a different init system of simply disable it. This is
especially useful with docker 1.13 that comes with its own stripped
down init system (a build of tini) that would cause the containers to
run double init systems if used with the '--init' command line
argument.
Change-Id: I220d8cfc81c25471e635b2f5790759f21e788e64
Closes-Bug: #1680770
Diffstat (limited to 'docker/base')
| -rw-r--r-- | docker/base/Dockerfile.j2 | 6 | ||||
| -rw-r--r-- | docker/base/start.sh | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 30a3150f0..2e575df82 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -366,7 +366,8 @@ 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 + && chmod +x /usr/local/bin/dumb-init \ + && sed -i 's|#!|#!/usr/local/bin/dumb-init |' /usr/local/bin/kolla_start {% else %} @@ -376,7 +377,8 @@ 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 + && chmod +x /usr/local/bin/dumb-init \ + && sed -i 's|#!|#!/usr/local/bin/dumb-init |' /usr/local/bin/kolla_start {% endif %} {% endblock %} diff --git a/docker/base/start.sh b/docker/base/start.sh index 3ca6291fc..261291268 100644 --- a/docker/base/start.sh +++ b/docker/base/start.sh @@ -1,4 +1,4 @@ -#!/usr/local/bin/dumb-init /bin/bash +#!/bin/bash set -o errexit # Wait for the log socket |
