Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: Don't upgrade pip anymore and --break-system-packages #2537

Merged
merged 1 commit into from
Mar 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions extra/docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ RUN apt-get update \
patchelf \
&& locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8 \
&& python3 -m pip install --no-cache-dir --upgrade pip \
&& python3 -m pip install --no-cache-dir --upgrade pwntools \
&& python3 -m pip install --no-cache-dir --break-system-packages --upgrade pwntools \
&& PWNLIB_NOTERM=1 pwn update \
&& useradd -m pwntools \
&& passwd --delete --unlock pwntools \
Expand Down
2 changes: 1 addition & 1 deletion extra/docker/beta/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM pwntools/pwntools:stable

USER root
RUN python3 -m pip install --no-cache-dir --force-reinstall --upgrade git+https://github.com/Gallopsled/pwntools@beta
RUN python3 -m pip uninstall --break-system-packages -q -y pwntools && python3 -m pip install --no-cache-dir --break-system-packages --upgrade git+https://github.com/Gallopsled/pwntools@beta
RUN PWNLIB_NOTERM=1 pwn update
USER pwntools
2 changes: 1 addition & 1 deletion extra/docker/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM pwntools/pwntools:stable

USER root
RUN python3 -m pip install --force-reinstall --upgrade git+https://github.com/Gallopsled/pwntools@dev
RUN python3 -m pip uninstall --break-system-packages -q -y pwntools && python3 -m pip install --no-cache-dir --break-system-packages --upgrade git+https://github.com/Gallopsled/pwntools@dev
RUN PWNLIB_NOTERM=1 pwn update
USER pwntools
8 changes: 4 additions & 4 deletions extra/docker/develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV HISTFILE=/home/pwntools/.history

# Uninstall existing versions of pwntools
USER root
RUN python3 -m pip uninstall -q -y pwntools
RUN python3 -m pip uninstall --break-system-packages -q -y pwntools

# Switch back to the pwntools user from here forward
USER pwntools
Expand All @@ -17,14 +17,14 @@ ENV PATH="/home/pwntools/.local/bin:${PATH}"

# Install Pwntools to the home directory, make it an editable install
RUN git clone https://github.com/Gallopsled/pwntools \
&& python3 -m pip install --upgrade --editable pwntools \
&& python3 -m pip install --break-system-packages --upgrade --editable pwntools \
&& PWNLIB_NOTERM=1 pwn version

# Requirements for running the tests
RUN python3 -m pip install --upgrade --requirement pwntools/docs/requirements.txt
RUN python3 -m pip install --break-system-packages --upgrade --requirement pwntools/docs/requirements.txt

# Python niceties for debugging
RUN python3 -m pip install -U ipython ipdb
RUN python3 -m pip install --break-system-packages -U ipython ipdb

# Dependencies from .travis.yml addons -> apt -> packages
ARG DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion extra/docker/stable/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM pwntools/pwntools:base

USER root
RUN python3 -m pip install --no-cache-dir --force-reinstall --upgrade git+https://github.com/Gallopsled/pwntools@stable
RUN python3 -m pip uninstall --break-system-packages -q -y pwntools && python3 -m pip install --no-cache-dir --break-system-packages --upgrade git+https://github.com/Gallopsled/pwntools@stable
RUN PWNLIB_NOTERM=1 pwn update
USER pwntools
12 changes: 4 additions & 8 deletions travis/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV HISTFILE=/home/pwntools/.history

# Uninstall existing versions of pwntools
USER root
RUN python3 -m pip uninstall -q -y pwntools
RUN python3 -m pip uninstall --break-system-packages -q -y pwntools

# Switch back to the pwntools user from here forward
USER pwntools
Expand All @@ -17,14 +17,14 @@ ENV PATH="/home/pwntools/.local/bin:${PATH}"

# Install Pwntools to the home directory, make it an editable install
RUN git clone https://github.com/Gallopsled/pwntools \
&& python3 -m pip install --upgrade --editable pwntools \
&& python3 -m pip install --break-system-packages --upgrade --editable pwntools \
&& PWNLIB_NOTERM=1 pwn version

# Requirements for running the tests
RUN python3 -m pip install --upgrade --requirement pwntools/docs/requirements.txt
RUN python3 -m pip install --break-system-packages --upgrade --requirement pwntools/docs/requirements.txt

# Python niceties for debugging
RUN python3 -m pip install -U ipython ipdb
RUN python3 -m pip install --break-system-packages -U ipython ipdb

# Dependencies from .travis.yml addons -> apt -> packages
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -80,10 +80,6 @@ ADD ipython_config.py /home/pwntools/.ipython/profile_default

# Do not require password for sudo
RUN echo "pwntools ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/travis

# Some additional debugging tools that are useful
RUN python3 -m pip install --no-cache-dir ipdb

# Install debugging utilities
USER root
RUN apt-get -y install gdb gdbserver tmux gdb-multiarch
Expand Down
4 changes: 0 additions & 4 deletions travis/docker/Dockerfile.travis
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

# Some additional debugging tools that are useful
RUN python3 -m pip install --no-cache-dir ipdb

# Install debugging utilities
USER root
RUN apt-get -y install gdb gdbserver tmux gdb-multiarch
Expand Down