Skip to content

Commit

Permalink
Stop preinstalling python packages
Browse files Browse the repository at this point in the history
pip is not sufficiantly sane to do that.

[noissue]
  • Loading branch information
mdellweg committed Jul 16, 2024
1 parent e25b149 commit 749a7b7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
16 changes: 0 additions & 16 deletions images/Containerfile.core.base
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,6 @@ RUN dnf -y install python${PYTHON_VERSION} python3-cryptography python${PYTHON_V
getcap /usr/bin/newuidmap | grep cap_setuid || dnf -y reinstall -y shadow-utils && \
dnf clean all

# Needed to prevent the wrong version of cryptography from being installed,
# which would break PyOpenSSL.
# Need to install optional dep, rhsm, for pulp-certguard
RUN pip3 install --upgrade pip setuptools wheel && \
rm -rf /root/.cache/pip && \
pip3 install \
rhsm \
setproctitle \
gunicorn \
python-nginx \
django-auth-ldap \
django-storages\[boto3,azure]\>=1.12.2 \
requests\[use_chardet_on_py3] && \
rm -rf /root/.cache/pip


RUN groupadd -g 700 --system pulp
RUN useradd -d /var/lib/pulp --system -u 700 -g pulp pulp

Expand Down
4 changes: 3 additions & 1 deletion images/pulp-minimal/nightly/Containerfile.core
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ RUN pip3 install git+https://github.com/pulp/pulpcore.git#egg=pulpcore \
git+https://github.com/pulp/pulp_npm.git \
git+https://github.com/pulp/pulp_ostree.git \
git+https://github.com/pulp/pulp_python.git \
git+https://github.com/pulp/pulp_rpm.git
git+https://github.com/pulp/pulp_rpm.git \
rhsm && \
rm -rf /root/.cache/pip

USER pulp:pulp
RUN PULP_STATIC_ROOT=/var/lib/operator/static/ PULP_CONTENT_ORIGIN=localhost \
Expand Down
3 changes: 2 additions & 1 deletion images/pulp-minimal/stable/Containerfile.core
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN pip3 install --upgrade \
pulp-maven${PULP_MAVEN_VERSION} \
pulp-python${PULP_PYTHON_VERSION} \
pulp-rpm${PULP_RPM_VERSION} \
pulp-ostree${PULP_OSTREE_VERSION} && \
pulp-ostree${PULP_OSTREE_VERSION} \
rhsm && \
rm -rf /root/.cache/pip

# Prevent pip-installed /usr/local/bin/pulp-content from getting run instead of
Expand Down
2 changes: 1 addition & 1 deletion images/pulp/nightly/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN pip3 install --upgrade \
git+https://github.com/pulp/pulp_ostree@main \
git+https://github.com/pulp/pulp_python@main \
git+https://github.com/pulp/pulp_rpm@main \
requests && \
rhsm && \
rm -rf /root/.cache/pip

USER pulp:pulp
Expand Down
1 change: 1 addition & 0 deletions images/pulp/stable/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RUN pip3 install --upgrade \
pulp-python${PULP_PYTHON_VERSION} \
pulp-rpm${PULP_RPM_VERSION} \
pulp-ostree${PULP_OSTREE_VERSION} \
rhsm \
requests && \
rm -rf /root/.cache/pip

Expand Down

0 comments on commit 749a7b7

Please sign in to comment.