base: update to dumb-init 1.2.2

This version allows us to use Debian binaries for non-x86 architectures
instead of building 'dumb-init'.

'base_compiler_packages' are installed as they will be needed anyway to
build other Python packages (no binary wheels for !x86). We also need
'binutils' to be installed for 'ar' command.

Change-Id: I53ad946ead4f0b485d8c7e8a91ac2ef5d7735c5a
This commit is contained in:
Marcin Juszkiewicz 2019-02-25 10:20:29 +01:00
parent 725bb6156a
commit f8fd560561
1 changed files with 9 additions and 6 deletions

View File

@ -409,18 +409,21 @@ 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 \
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 \
&& chmod +x /usr/local/bin/dumb-init
{% else %}
{{ macros.install_packages(base_compiler_packages) }}
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
{% set dumb_init_package_name = "dumb-init_1.2.2-1.1_" + debian_arch + ".deb" %}
RUN curl -sSL http://deb.debian.org/debian/pool/main/d/dumb-init/{{dumb_init_package_name}} -o {{dumb_init_package_name}} \
&& ar -x {{dumb_init_package_name}} data.tar.xz \
&& tar xf data.tar.xz ./usr/bin/dumb-init \
&& install -d -m 0755 /usr/local/bin \
&& mv usr/bin/dumb-init /usr/local/bin/dumb-init \
&& rm data.tar.xz {{dumb_init_package_name}}
{% endif %}