Skip to content
Snippets Groups Projects
Commit 4add92df authored by Daniel Nemergut's avatar Daniel Nemergut Committed by Sam Kagan
Browse files

Changed the base image of pex-watcher to almalinux and updated the Python...

Changed the base image of pex-watcher to almalinux and updated the Python installation accordingly (suggestions from 5ba198a6)
parent 9bd6f3ed
No related branches found
No related tags found
No related merge requests found
FROM centos/python-38-centos7:20210726-fad62e9
FROM almalinux/8-base
USER root
......
......@@ -6,25 +6,26 @@ set -o pipefail
# Install Python 3.10
PYTHON_VERSION=3.10.9
yum install -y gcc
yum install -y epel-release
yum install -y openssl11-devel
yum install -y bzip2-devel
yum install -y libffi-devel
# Oops - lol. Note to self - never be the dev that caused that: https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
dnf update -y
dnf install gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make -y
cd /opt
wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz
tar xzf Python-$PYTHON_VERSION.tgz && cd Python-$PYTHON_VERSION
# tragic workaround to make Python find openssl 1.1 instead of not finding 1.0
sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
#sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
./configure --enable-optimizations
make -j 2
make altinstall
cd ..
rm -rf Python-$PYTHON_VERSION.tgz
yum clean all
rm -rf /var/cache/yum
dnf clean packages
# Make symbolic link of python3 install to where it's installed on dev
mkdir -p /home/ssa/bin
ln -s "$(which python3.10)" /home/ssa/bin/python3.10
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment