Skip to content

Commit 1b309e8

Browse files
authored
Image update: ubuntu to 24.04, gcsfuse to 1.x, nsjail to latest (#409)
1 parent 5d0f830 commit 1b309e8

File tree

6 files changed

+21
-19
lines changed

6 files changed

+21
-19
lines changed

dist/challenge-templates/pwn/challenge/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM ubuntu:20.04 as chroot
14+
FROM ubuntu:24.04 as chroot
1515

1616
RUN /usr/sbin/useradd --no-create-home -u 1000 user
1717

dist/challenge-templates/web/challenge/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM ubuntu:20.04 as chroot
14+
FROM ubuntu:24.04 as chroot
1515

1616
RUN /usr/sbin/useradd -u 1000 user
1717

docker-images/certbot/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:24.04
22
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y certbot python3-certbot-dns-google curl jq
33
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x kubectl
44
COPY certbot.sh certbot.sh

docker-images/challenge/Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,32 @@
1313
# limitations under the License.
1414

1515
# build nsjail first
16-
FROM ubuntu:20.04 as nsjail
16+
FROM ubuntu:24.04 as nsjail
1717

1818
ENV BUILD_PACKAGES build-essential git protobuf-compiler libprotobuf-dev bison flex pkg-config libnl-route-3-dev ca-certificates
19-
ENV NSJAIL_COMMIT f920c9194ec1e9654f051eb2390604059c951ea2
19+
ENV NSJAIL_COMMIT 3677ccbe45b184bd4600415cbfb48762a2735674
2020

2121
RUN apt-get update \
2222
&& apt-get install -yq --no-install-recommends $BUILD_PACKAGES \
2323
&& rm -rf /var/lib/apt/lists/* \
2424
&& git clone https://github.com/google/nsjail.git \
2525
&& cd /nsjail && git checkout $NSJAIL_COMMIT && make -j && cp nsjail /usr/bin/ \
26-
&& rm -R /nsjail && apt-get remove --purge -y $BUILD_PACKAGES $(apt-mark showauto)
26+
&& rm -R /nsjail
2727

2828
# challenge image
29-
FROM ubuntu:20.04
29+
FROM ubuntu:24.04
3030

3131
RUN apt-get update \
32-
&& apt-get install -yq --no-install-recommends build-essential python3-dev python3.8 python3-pip libgmp3-dev libmpc-dev uidmap libprotobuf17 libnl-route-3-200 wget netcat ca-certificates socat \
32+
&& apt-get install -yq --no-install-recommends build-essential python3-dev python3.8 python3-pip libgmp3-dev libmpc-dev uidmap libprotobuf32t64 libnl-route-3-200 wget netcat-traditional ca-certificates socat \
3333
&& rm -rf /var/lib/apt/lists/*
3434

35-
RUN /usr/sbin/useradd --no-create-home -u 1000 user
35+
# ubuntu24 includes the ubuntu user by default
36+
RUN /usr/sbin/userdel -r ubuntu && /usr/sbin/useradd --no-create-home -u 1000 user
3637

3738
COPY --from=nsjail /usr/bin/nsjail /usr/bin/nsjail
3839

3940
# gmpy2 and ecdsa used by the proof of work
40-
RUN python3 -m pip install ecdsa gmpy2
41+
RUN python3 -m pip install --break-system-packages ecdsa gmpy2
4142

4243
# we need a clean proc to allow nsjail to remount it in the user namespace
4344
RUN mkdir /kctf

docker-images/gcsfuse/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:24.04
22

33
RUN apt-get update && apt-get install -y wget fuse
4-
RUN wget -q https://github.com/GoogleCloudPlatform/gcsfuse/releases/download/v0.35.1/gcsfuse_0.35.1_amd64.deb && dpkg -i gcsfuse_0.35.1_amd64.deb
4+
RUN wget -q https://github.com/GoogleCloudPlatform/gcsfuse/releases/download/v1.4.2/gcsfuse_1.4.2_amd64.deb && dpkg -i gcsfuse_1.4.2_amd64.deb
55
RUN mkdir -p /mnt/disks/gcs
66

77
CMD test -f /config/gcs_bucket &&\

docker-images/healthcheck/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -11,19 +11,20 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM ubuntu:20.04
14+
FROM ubuntu:24.04
1515

1616
ENV BUILD_PACKAGES python3-pip build-essential python3-dev
1717

1818
RUN apt-get update \
1919
&& apt-get -yq --no-install-recommends install $BUILD_PACKAGES \
2020
&& rm -rf /var/lib/apt/lists/* \
21-
&& python3 -m pip install pwntools \
22-
&& apt-get remove --purge -y $BUILD_PACKAGES $(apt-mark showauto)
21+
&& python3 -m pip install --break-system-packages pwntools \
22+
&& apt-get remove --purge -y $BUILD_PACKAGES && apt-get autoremove -y
2323

2424
RUN apt-get update && apt-get -yq --no-install-recommends install cpio openssl python3 && rm -rf /var/lib/apt/lists/*
2525

26-
RUN /usr/sbin/useradd --no-create-home -u 1000 user
26+
# ubuntu24 includes the ubuntu user by default
27+
RUN /usr/sbin/userdel -r ubuntu && /usr/sbin/useradd --no-create-home -u 1000 user
2728

2829
RUN mkdir -p /home/user/.pwntools-cache && echo never > /home/user/.pwntools-cache/update
2930

0 commit comments

Comments
 (0)