aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker/base/Dockerfile.j26
-rw-r--r--docker/base/start.sh2
-rw-r--r--releasenotes/notes/make_init_system_configurable-0ee16808b6e90954.yaml8
3 files changed, 13 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
diff --git a/releasenotes/notes/make_init_system_configurable-0ee16808b6e90954.yaml b/releasenotes/notes/make_init_system_configurable-0ee16808b6e90954.yaml
new file mode 100644
index 000000000..6eb819dfb
--- /dev/null
+++ b/releasenotes/notes/make_init_system_configurable-0ee16808b6e90954.yaml
@@ -0,0 +1,8 @@
+---
+features:
+ - Make containers init system configurable. This is particularly useful with
+ docker 1.13 that comes with its own minimal init and would result in double
+ init system with used with the `--init` command line argument.
+upgrade:
+ - The operator now needs to customize the shebang as part of the minimal init
+ install.