Skip to content

Commit 3fd5c90

Browse files
pb8oroypat
authored andcommitted
chore(devctr): update devctr to Ubuntu 24.04
Notably, Python and poetry required some changes to keep working the way it was, as installing Python modules via pip outside a venv is getting more and more difficult. Raised the versions of Python dependencies, and updated some pinned versions. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent 01d9e8e commit 3fd5c90

File tree

4 files changed

+791
-698
lines changed

4 files changed

+791
-698
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ build/
33
src/
44
tests/
55
docs/
6+
resources/
7+
tools/test-popular-containers/
8+
test_results/

tools/devctr/Dockerfile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/lts/ubuntu:22.04
1+
FROM public.ecr.aws/lts/ubuntu:24.04
22

33
# TODO: use a multi-stage build to reduce the download size when updating this container.
44
# The Rust toolchain layer will get updated most frequently, but we could keep the system
@@ -7,6 +7,7 @@ FROM public.ecr.aws/lts/ubuntu:22.04
77
ARG RUST_TOOLCHAIN="1.79.0"
88
ARG TMP_BUILD_DIR=/tmp/build
99
ARG DEBIAN_FRONTEND=noninteractive
10+
ARG PIP_BREAK_SYSTEM_PACKAGES=1
1011
ARG ARCH
1112

1213
ENV CARGO_HOME=/usr/local/rust
@@ -37,7 +38,7 @@ RUN apt-get update \
3738
&& pip3 uninstall -y meson \
3839
&& apt-get purge -y \
3940
curl gpg gpg-agent \
40-
python3-pip build-essential ninja-build libglib2.0-dev libpixman-1-dev flex bison \
41+
build-essential ninja-build libglib2.0-dev libpixman-1-dev flex bison \
4142
&& apt-get autoremove -y \
4243
&& cd && rm -r /tmp/qemu_build
4344

@@ -84,13 +85,18 @@ RUN apt-get update \
8485
# for debugging
8586
gdb strace \
8687
&& rm -rf /var/lib/apt/lists/* \
87-
&& pip3 install --upgrade pip poetry
88-
88+
&& pip3 install --upgrade poetry
8989

90+
ARG VENV="/opt/venv"
9091
COPY tools/devctr /tmp/poetry
91-
RUN cd /tmp/poetry && \
92-
HOME=. POETRY_VIRTUALENVS_CREATE=false poetry install --only main --no-interaction \
93-
&& rm -rf ~/.cache ~/.local /tmp/poetry
92+
RUN cd /tmp/poetry \
93+
&& virtualenv $VENV \
94+
&& . $VENV/bin/activate \
95+
&& poetry install --only main --no-directory --no-interaction \
96+
&& rm -rf ~/.local/share/virtualenv/ ~/.cache /tmp/poetry \
97+
&& cd -
98+
ENV VIRTUAL_ENV=$VENV
99+
ENV PATH=$VENV/bin:$PATH
94100

95101
# Running the three as a single dockerfile command to avoid inflation of the image:
96102
# - Install the Rust toolchain. Kani only work on x86, so only try to install it there

0 commit comments

Comments
 (0)