Add block for dumb-init installation

This moves the dumb-init installation to its own RUN command in a
separate block so that it can be overridden for Internet-disconnected
builds.

Change-Id: Ice1d6b086db85d2c2b364518b26eb819e92e1d4f
Closes-Bug: #1657583
This commit is contained in:
Edmund Rhudy 2017-01-18 16:28:56 -05:00 committed by Jeffrey Zhang
parent cae2305f78
commit 7930127e62
1 changed files with 7 additions and 3 deletions

View File

@ -310,15 +310,19 @@ COPY set_configs.py /usr/local/bin/kolla_set_configs
COPY start.sh /usr/local/bin/kolla_start
COPY sudoers /etc/sudoers
COPY curlrc /root/.curlrc
{% block dumb_init_installation %}
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
{% endblock %}
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 \
&& chmod 440 /etc/sudoers \
&& mkdir -p /var/log/kolla \
&& chown :kolla /var/log/kolla \
&& chmod 2775 /var/log/kolla \
&& rm -f /tmp/kolla_bashrc \
&& 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
&& rm -f /tmp/kolla_bashrc
{% block base_footer %}{% endblock %}
CMD ["kolla_start"]