-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -d pulp-oci-images ]]; then | ||
git clone https://github.com/pulp/pulp-oci-images | ||
fi | ||
cd pulp-oci-images | ||
git reset --hard | ||
cd .. | ||
|
||
curl -o pulp-oci-images/images/assets/switch_python \ | ||
https://raw.githubusercontent.com/pulp/oci_env/main/base/switch_python | ||
chmod +x pulp-oci-images/images/assets/switch_python | ||
|
||
cd pulp-oci-images | ||
git apply ../py311.patch | ||
|
||
docker build --file images/Containerfile.core.base --tag pulp/base:latest . | ||
docker build --file images/pulp_ci_centos/Containerfile --tag pulp/pulp-ci-centos9:latest . | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/images/Containerfile.core.base b/images/Containerfile.core.base | ||
index c05669c..7d84cb8 100644 | ||
--- a/images/Containerfile.core.base | ||
+++ b/images/Containerfile.core.base | ||
@@ -130,6 +130,10 @@ COPY images/assets/add_signing_service.sh /usr/bin/add_signing_service.sh | ||
COPY images/assets/pulp-api /usr/bin/pulp-api | ||
COPY images/assets/pulp-content /usr/bin/pulp-content | ||
COPY images/assets/pulp-worker /usr/bin/pulp-worker | ||
+COPY images/assets/switch_python /usr/bin/switch_python | ||
+ | ||
+ARG PYTHON_VERSION=3.11 | ||
+RUN switch_python "$PYTHON_VERSION" | ||
|
||
# Need to precreate when running pulp as the pulp user | ||
RUN touch /var/log/galaxy_api_access.log && \ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
NEWV=$1 | ||
if [[ "$NEWV" == "3.8" ]]; then | ||
echo "using default python 3.8" | ||
exit 0 | ||
fi | ||
|
||
echo "switching python to $NEWV" | ||
|
||
rm -f /usr/local/bin/pip3 | ||
dnf install -y python${NEWV} python${NEWV}-pip python${NEWV}-devel | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${NEWV} 1 | ||
update-alternatives --set python3 /usr/bin/python${NEWV} | ||
update-alternatives --install /usr/bin/pip3 pip3 /usr/bin/pip-${NEWV} 1 | ||
update-alternatives --set pip3 /usr/bin/pip-${NEWV} |