Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Migrate to centos:stream9 for python3.9
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Belanger <[email protected]>
  • Loading branch information
pabelanger committed Mar 22, 2022
1 parent 737b675 commit 2d43719
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG CONTAINER_IMAGE=quay.io/centos/centos:stream8
ARG CONTAINER_IMAGE=quay.io/centos/centos:stream9
ARG REMOTE_SOURCE=.
ARG REMOTE_SOURCE_DIR=/remote-source

Expand All @@ -32,29 +32,19 @@ RUN if [[ "$CONTAINER_IMAGE" =~ "centos" ]] ; then \
dnf update -y ; \
dnf install -y epel-release dnf-plugins-core ; \
dnf config-manager --set-disabled epel ; \
dnf config-manager --set-enabled powertools ; \
dnf module enable -y python38-devel ; \
dnf clean all ; \
rm -rf /var/cache/{dnf,yum} ; \
rm -rf /var/lib/dnf/history.* ; \
rm -rf /var/log/* ; \
fi

RUN dnf update -y \
&& dnf install -y glibc-langpack-en python38-pip \
&& dnf install -y glibc-langpack-en python3-pip \
&& dnf clean all \
&& rm -rf /var/cache/{dnf,yum} \
&& rm -rf /var/lib/dnf/history.* \
&& rm -rf /var/log/*

# NOTE(pabelanger): We do this to allow users to install python36 but not
# change python3 to python36.
RUN alternatives --set python3 /usr/bin/python3.8

# Upgrade pip to fix wheel cache for locally built wheels.
# See https://github.com/pypa/pip/issues/6852
RUN python3 -m pip install --no-cache-dir -U pip

RUN dnf update -y \
&& dnf install -y gcc \
&& pip3 install dumb-init --no-cache-dir -c constraints.txt \
Expand Down

0 comments on commit 2d43719

Please sign in to comment.