Verified Commit 0c2d4aa0 authored by Nikos Chantziaras's avatar Nikos Chantziaras
Browse files

xenial-gcc9: Drop python from apt, install python 3.10.4 from source

parent be3ce985
Pipeline #110475 passed with stage
in 13 minutes and 9 seconds
......@@ -9,7 +9,7 @@ docker-build-master:
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
- docker build --pull -t "$CI_REGISTRY_IMAGE:xenial-gcc9" --file Dockerfile.xenial-gcc9 .
- docker build --pull -t "$CI_REGISTRY_IMAGE:xenial-gcc9" --build-arg NUMPROC=$(nproc) --file Dockerfile.xenial-gcc9 .
- docker push "$CI_REGISTRY_IMAGE:xenial-gcc9"
- docker build --pull -t "$CI_REGISTRY_IMAGE:unit-test" --file Dockerfile.unit-test .
- docker push "$CI_REGISTRY_IMAGE:unit-test"
......@@ -27,7 +27,7 @@ docker-build:
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-xenial-gcc9" --file Dockerfile.xenial-gcc9 .
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-xenial-gcc9" --build-arg NUMPROC=$(nproc) --file Dockerfile.xenial-gcc9 .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-xenial-gcc9"
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-unit-test" --file Dockerfile.unit-test .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-unit-test"
......
......@@ -6,6 +6,8 @@ ARG uid
ARG branch=master
ENV branch=$branch
ARG NUMPROC
ENV PACKAGES \
build-essential \
bash \
......@@ -26,14 +28,6 @@ ENV PACKAGES \
gawk \
make \
nsis \
python \
python2.7 \
python-pip \
python-mako \
python3-pip \
python3-yaml \
python3-sphinx \
python3-setuptools \
texinfo \
autoconf \
automake \
......@@ -48,13 +42,17 @@ ENV PACKAGES \
less \
libasound2 \
libass-dev \
libbz2-dev \
libc6-dev-i386 \
libffi-dev \
libgdbm-dev \
libgdk-pixbuf2.0-dev \
libglib2.0-dev \
libglu1-mesa-dev \
libltdl-dev \
libpcap-dev \
libssl-dev \
libreadline-dev \
libtool \
libtool-bin \
libxml-parser-perl \
......@@ -66,8 +64,6 @@ ENV PACKAGES \
lzop \
mesa-common-dev \
meson \
ninja-build \
openssl \
p7zip-full \
patch \
patchutils \
......@@ -81,6 +77,7 @@ ENV PACKAGES \
texinfo \
unzip \
u-boot-tools \
uuid-dev \
wget \
nasm \
bsdmainutils \
......@@ -150,7 +147,45 @@ RUN set -eux; \
rm -rf /var/lib/apt/lists/*
RUN set -eux; \
python3 -m pip install --upgrade --no-cache-dir "pip < 21.0"
cd /tmp; \
wget --no-check-certificate -nv "https://www.openssl.org/source/openssl-1.1.1o.tar.gz" -O- | tar xz; \
cd openssl-*; \
CC=gcc-9 CXX=g++-9 ./config --prefix=/usr/local; \
make -j${NUMPROC}; \
make install -j${NUMPROC}; \
cd ..; \
rm -rf *; \
rm -rf /usr/local/share/doc/*; \
rm -rf /usr/local/share/man/*; \
ldconfig
RUN set -eux; \
cd /tmp; \
wget -nv "https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tar.xz" -O- | tar xJ; \
mkdir build; \
cd build; \
CC=gcc-9 CXX=g++-9 ../Python-*/configure \
--prefix=/usr/local \
--enable-optimizations \
; \
make -j${NUMPROC}; \
make altinstall; \
ln -sf /usr/local/bin/python3.10 /usr/local/bin/python3; \
cd ..; \
rm -rf *; \
rm -rf /usr/local/share/doc/*; \
rm -rf /usr/local/share/man/*; \
ldconfig
RUN set -eux; \
python3 -m pip install --upgrade --no-cache-dir pip; \
python3 -m pip install --no-cache-dir \
mako \
ninja \
pyyaml \
setuptools \
sphinx \
;
RUN echo "developer:developer" | chpasswd && adduser developer sudo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment