pegleg/images/pegleg/Dockerfile.ubuntu_xenial
Phil Sphicas f020bdbc3f Fix ubuntu_xenial build (use pip <21.0)
pip 21.0 requires Python >= 3.6. [0]
The latest official python3 package for xenial is 3.5.1-3 [1]

Until we stop building xenial images, ensure that an older pip version
is used.

0: https://pypi.org/project/pip/21.0/
1: https://packages.ubuntu.com/xenial/python3
Change-Id: I6a51ae5b9e3222ca404c7ccd7dea1209b20ce8fd
2021-02-15 04:33:54 +00:00

74 lines
2.3 KiB
Docker

ARG FROM=ubuntu:16.04
FROM ${FROM}
ARG CFSSLURL=https://pkg.cfssl.org/R1.2/cfssl_linux-amd64
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode'
LABEL org.opencontainers.image.url='https://airshipit.org'
LABEL org.opencontainers.image.documentation='https://airship-pegleg.readthedocs.org'
LABEL org.opencontainers.image.source='https://opendev.org/airship/pegleg'
LABEL org.opencontainers.image.vendor='The Airship Authors'
LABEL org.opencontainers.image.licenses='Apache-2.0'
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ARG DECKHAND_VERSION=branch/master
ARG SHIPYARD_VERSION=branch/master
ARG PROMENADE_VERSION=branch/master
RUN set -ex \
&& apt-get update -qq \
&& apt-get install -y --no-install-recommends \
automake \
ca-certificates \
curl \
gcc \
git \
libssl-dev \
libtool \
make \
netbase \
openssh-client \
python3-dev \
python3-pip \
python3-setuptools \
&& python3 -m pip install -U 'pip<21.0' \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/usr/share/doc \
/usr/share/doc-base \
/usr/share/man \
/var/lib/apt/lists/* \
/var/log/* \
/var/tmp/*
ENV LD_LIBRARY_PATH=/usr/local/lib
ARG LIBYAML_VERSION=0.2.5
RUN set -ex \
&& git clone https://github.com/yaml/libyaml.git \
&& cd libyaml \
&& git checkout $LIBYAML_VERSION \
&& ./bootstrap \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& rm -fr libyaml
VOLUME /var/pegleg
WORKDIR /var/pegleg
COPY requirements.txt /opt/pegleg/requirements.txt
RUN pip3 install -r https://opendev.org/airship/deckhand/raw/${DECKHAND_VERSION}/requirements.txt \
&& pip3 install -r https://opendev.org/airship/promenade/raw/${PROMENADE_VERSION}/requirements.txt \
&& pip3 install -r https://opendev.org/airship/shipyard/raw/${SHIPYARD_VERSION}/src/bin/shipyard_client/requirements.txt \
&& pip3 install --no-cache-dir -r /opt/pegleg/requirements.txt
COPY tools/install-cfssl.sh /opt/pegleg/tools/install-cfssl.sh
RUN /opt/pegleg/tools/install-cfssl.sh ${CFSSLURL}
COPY . /opt/pegleg
RUN pip3 install -e /opt/pegleg