Skip to content

Commit 6a9f78a

Browse files
nfsecArusekk
andauthored
Upgrade to Ubuntu Focal 20.04 LTS (Gallopsled#2118)
* Update Dockerfile * Move to Ubuntu Jammy 22.04 and keep python2.7 * Apparently Debian intentionally broke ensurepip Co-authored-by: Arusekk <[email protected]>
1 parent 48d76ed commit 6a9f78a

File tree

6 files changed

+35
-35
lines changed

6 files changed

+35
-35
lines changed

extra/docker/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ifneq ($(HISTFILE),)
77
MOUNT_HISTFILE=--mount type=bind,source="$(HISTFILE)",target=/home/pwntools/.history
88
endif
99

10-
all: $(subdirs) $(tags)
10+
all: $(tags) $(subdirs)
1111

1212
tags: $(tags)
1313

@@ -36,4 +36,4 @@ clean:
3636

3737
FORCE:
3838

39-
.PHONY: all $(subdirs) $(makefiles) $(tags)
39+
.PHONY: all $(subdirs) $(makefiles) $(tags)

extra/docker/base/Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
# Based on Ubuntu
44
############################################################
55

6-
FROM ubuntu:bionic
6+
FROM ubuntu:jammy
77
MAINTAINER Maintainer Gallopsled et al.
88

9-
env DEBIAN_FRONTEND=noninteractive
109
ENV LANG en_US.UTF-8
1110
ENV LANGUAGE en_US:en
1211
ENV LC_ALL en_US.UTF-8
1312

13+
ARG DEBIAN_FRONTEND=noninteractive
1414
RUN apt-get update \
15-
&& apt-get install locales \
16-
&& locale-gen en_US.UTF-8 \
1715
&& apt-get install -y \
16+
sudo \
17+
locales \
1818
build-essential \
1919
elfutils \
2020
git \
2121
libssl-dev \
2222
libffi-dev \
23-
python \
24-
python-pip \
25-
python-dev \
23+
python2.7 \
24+
python2.7-dev \
25+
python2-pip-whl \
2626
python3 \
2727
python3-pip \
2828
python3-dev \
@@ -36,14 +36,14 @@ RUN apt-get update \
3636
binutils-sparc64-linux-gnu \
3737
tmux \
3838
patchelf \
39-
&& pip install --upgrade pip \
40-
&& python -m pip install --upgrade pwntools \
41-
&& pip3 install --upgrade pip \
39+
&& locale-gen en_US.UTF-8 \
40+
&& update-locale LANG=en_US.UTF-8 \
41+
&& PYTHONPATH=`echo /usr/share/python-wheels/pip-*.whl` python2.7 -m pip install --upgrade pip setuptools wheel \
42+
&& python2.7 -m pip install --upgrade pwntools \
43+
&& python3 -m pip install --upgrade pip \
4244
&& python3 -m pip install --upgrade pwntools \
4345
&& PWNLIB_NOTERM=1 pwn update \
44-
&& apt-get install -y sudo \
4546
&& useradd -m pwntools \
4647
&& passwd --delete --unlock pwntools \
4748
&& echo "pwntools ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/pwntools
4849
USER pwntools
49-
WORKDIR /home/pwntools

extra/docker/beta/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM pwntools/pwntools:stable
22

33
USER root
4-
RUN pip install --upgrade git+https://github.com/Gallopsled/pwntools@beta
5-
RUN pip3 install --upgrade git+https://github.com/Gallopsled/pwntools@beta
4+
RUN python2.7 -m pip install --upgrade git+https://github.com/Gallopsled/pwntools@beta \
5+
&& python3 -m pip install --upgrade git+https://github.com/Gallopsled/pwntools@beta
66
RUN PWNLIB_NOTERM=1 pwn update
77
USER pwntools

extra/docker/dev/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM pwntools/pwntools:stable
22

33
USER root
4-
RUN pip install --upgrade git+https://github.com/Gallopsled/pwntools@dev
5-
RUN pip3 install --upgrade git+https://github.com/Gallopsled/pwntools@dev
4+
RUN python2.7 -m pip install --upgrade git+https://github.com/Gallopsled/pwntools@dev \
5+
&& python3 -m pip install --upgrade git+https://github.com/Gallopsled/pwntools@dev
66
RUN PWNLIB_NOTERM=1 pwn update
77
USER pwntools

extra/docker/develop/Dockerfile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ENV HISTFILE=/home/pwntools/.history
55

66
# Uninstall existing versions of pwntools
77
USER root
8-
RUN python -m pip uninstall -q -y pwntools \
9-
&& python3 -m pip uninstall -q -y pwntools
8+
RUN python2.7 -m pip uninstall -q -y pwntools \
9+
&& python3 -m pip uninstall -q -y pwntools
1010

1111
# Switch back to the pwntools user from here forward
1212
USER pwntools
@@ -18,20 +18,23 @@ ENV PATH="/home/pwntools/.local/bin:${PATH}"
1818

1919
# Install Pwntools to the home directory, make it an editable install
2020
RUN git clone https://github.com/Gallopsled/pwntools \
21-
&& python -m pip install --upgrade --editable pwntools \
21+
&& python2.7 -m pip install --upgrade --editable pwntools \
2222
&& python3 -m pip install --upgrade --editable pwntools \
2323
&& PWNLIB_NOTERM=1 pwn version
2424

2525
# Requirements for running the tests
26-
RUN python -m pip install --upgrade --requirement pwntools/docs/requirements.txt \
27-
&& python3 -m pip install --upgrade --requirement pwntools/docs/requirements.txt
26+
RUN python2.7 -m pip install --upgrade --requirement pwntools/docs/requirements.txt \
27+
&& python3 -m pip install --upgrade --requirement pwntools/docs/requirements.txt
2828

2929
# Python niceties for debugging
30-
RUN python -m pip install -U ipython ipdb \
31-
&& python3 -m pip install -U ipython ipdb
30+
RUN python2.7 -m pip install -U ipython ipdb \
31+
&& python3 -m pip install -U ipython ipdb
3232

3333
# Dependencies from .travis.yml addons -> apt -> packages
34-
RUN sudo apt-get update && sudo apt-get install -y \
34+
ARG DEBIAN_FRONTEND=noninteractive
35+
ENV TZ="UTC"
36+
RUN sudo apt-get update && sudo -E apt-get install -y \
37+
tzdata \
3538
ash \
3639
bash \
3740
bash-static \
@@ -41,7 +44,7 @@ RUN sudo apt-get update && sudo apt-get install -y \
4144
dash \
4245
gcc \
4346
gcc-multilib \
44-
gdb \
47+
gdb \
4548
ksh \
4649
lib32stdc++6 \
4750
libc6-dev-i386 \
@@ -51,20 +54,17 @@ RUN sudo apt-get update && sudo apt-get install -y \
5154
socat \
5255
sshpass \
5356
vim \
54-
zsh
55-
57+
zsh \
5658
# Misc useful things when developing
57-
RUN sudo apt-get install -y \
5859
curl \
59-
ipython \
6060
ipython3 \
6161
lsb-release \
6262
ssh \
6363
unzip \
6464
wget
6565

6666
# Use zsh by default
67-
RUN sudo chsh -s /bin/zsh pwntools
67+
RUN sudo -E chsh -s /bin/zsh pwntools
6868

6969
# Get and install prezto
7070
RUN git clone --recursive https://github.com/sorin-ionescu/prezto.git .zprezto
@@ -83,4 +83,4 @@ ADD 10-import.py /home/pwntools/.ipython/profile_default/startup
8383
ADD ipython_config.py /home/pwntools/.ipython/profile_default
8484

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

extra/docker/stable/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM pwntools/pwntools:base
22

33
USER root
4-
RUN pip install --upgrade git+https://github.com/Gallopsled/pwntools@stable
5-
RUN pip3 install --upgrade git+https://github.com/Gallopsled/pwntools@stable
4+
RUN python2.7 -m pip install --upgrade git+https://github.com/Gallopsled/pwntools@stable \
5+
&& python3 -m pip install --upgrade git+https://github.com/Gallopsled/pwntools@stable
66
RUN PWNLIB_NOTERM=1 pwn update
77
USER pwntools

0 commit comments

Comments
 (0)