Last active
January 17, 2024 06:07
-
-
Save cybertramp/8af51a542567ede47665c25d72efab31 to your computer and use it in GitHub Desktop.
jenkins with Python 3.11 in Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jenkins/jenkins:lts | |
USER root | |
RUN mkdir -p /tmp/python_build && \ | |
apt update && \ | |
apt-get install -y \ | |
build-essential \ | |
zlib1g-dev \ | |
libncurses5-dev \ | |
libgdbm-dev \ | |
libnss3-dev \ | |
libssl-dev \ | |
libreadline-dev \ | |
libffi-dev \ | |
libsqlite3-dev \ | |
wget \ | |
libbz2-dev \ | |
sshpass && \ | |
cd /tmp/python_build && \ | |
wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz && \ | |
tar -xf Python-3.11.0.tgz && \ | |
cd Python-3.11.0 && \ | |
./configure --enable-optimizations && \ | |
make -j 12 && make altinstall && \ | |
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.11 1 && \ | |
rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED && \ | |
apt install -y python3-pip && \ | |
pip3 install --upgrade pip --break-system-packages && \ | |
curl -sSL https://install.python-poetry.org | python3 - && \ | |
export PATH="$HOME/.local/bin:$PATH" | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Verification