Skip to content

Commit

Permalink
add pipx force
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeeq committed Dec 19, 2024
1 parent c1034fd commit 94c2ff3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN dnf clean all \
&& dnf install -y \
python3-pip \
systemd \
pipx \
ShellCheck \
&& dnf clean all

Expand All @@ -28,18 +29,17 @@ rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*;

# https://pypi.org/project/pip/
RUN pip3 install --no-cache-dir --upgrade pip==24.3.1 && \
pip3 install --no-cache-dir \
RUN pipx install --global --force --include-deps \
# https://pypi.org/project/ansible/
ansible==10.5.0 \
ansible \
# https://pypi.org/project/ansible-lint/
ansible-lint==24.9.2 \
ansible-lint \
# https://pypi.org/project/yamllint/
yamllint==1.35.1 \
yamllint \
# https://pypi.org/project/packaging/
packaging==24.1 \
packaging \
# https://pypi.org/project/pyOpenSSL/
pyOpenSSL==24.2.1
pyOpenSSL

# Dive
RUN curl -LO https://github.com/wagoodman/dive/releases/download/v${DIVE_VERSION}/dive_${DIVE_VERSION}_linux_amd64.tar.gz && \
Expand Down
14 changes: 8 additions & 6 deletions Dockerfile-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
python3-pip \
pipx \
sudo \
&& apt-get clean all

# https://pypi.org/project/pip/
# rm -rfv /usr/lib/*/EXTERNALLY-MANAGED
# RUN pip3 install --break-system-packages --no-cache-dir --upgrade pip==24.3.1 && \
RUN pip3 install --break-system-packages --no-cache-dir \
# https://pypi.org/project/pip/
RUN pipx install --global --force --include-deps \
# https://pypi.org/project/ansible/
ansible==10.5.0 \
ansible \
# https://pypi.org/project/ansible-lint/
ansible-lint==24.9.2 \
ansible-lint \
# https://pypi.org/project/yamllint/
yamllint==1.35.1 \
yamllint \
# https://pypi.org/project/packaging/
packaging==24.1 \
packaging \
# https://pypi.org/project/pyOpenSSL/
pyOpenSSL==24.2.1
pyOpenSSL

RUN useradd ${UBUNTU_USERNAME} && usermod -aG sudo ${UBUNTU_USERNAME}

Expand Down
2 changes: 2 additions & 0 deletions roles/pkg_mgmt/pip/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
install_deps: true
global: true
python: "{{ item.python_version | default(omit) }}"
force: true
with_items:
- "{{ pipx_apps }}"

Expand All @@ -63,6 +64,7 @@
python: "{{ item.python_version | default(omit) }}"
install_apps: true
inject_packages: "{{ item.inject_packages | default(omit) }}"
force: true
when: item.inject_packages is defined
with_items:
- "{{ pipx_apps }}"
Expand Down

0 comments on commit 94c2ff3

Please sign in to comment.