Skip to content

Commit

Permalink
chore(devctr): update devctr to Ubuntu 24.04
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pb8o committed Sep 12, 2024
1 parent 50a7037 commit a06fb20
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 164 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ build/
src/
tests/
docs/
resources/
tools/test-popular-containers/
test_results/
16 changes: 9 additions & 7 deletions tools/devctr/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/lts/ubuntu:22.04
FROM public.ecr.aws/lts/ubuntu:24.04

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

ENV CARGO_HOME=/usr/local/rust
ENV RUSTUP_HOME=/usr/local/rust
ENV PATH="$PATH:$CARGO_HOME/bin"
ENV PATH="$PATH:$CARGO_HOME/bin:/root/.bin"
ENV LC_ALL=C.UTF-8
ENV QEMU_VER="8.1.1"
ENV CROSVM_VER="9d542e6dafa3a85acd1fb6cd6f1adfa1331c4e96"
Expand All @@ -37,7 +38,7 @@ RUN apt-get update \
&& pip3 uninstall -y meson \
&& apt-get purge -y \
curl gpg gpg-agent \
python3-pip build-essential ninja-build libglib2.0-dev libpixman-1-dev flex bison \
build-essential ninja-build libglib2.0-dev libpixman-1-dev flex bison \
&& apt-get autoremove -y \
&& cd && rm -r /tmp/qemu_build

Expand Down Expand Up @@ -84,13 +85,14 @@ RUN apt-get update \
# for debugging
gdb strace \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install --upgrade pip poetry
&& pip3 install --upgrade poetry


COPY tools/devctr /tmp/poetry
RUN cd /tmp/poetry && \
HOME=. POETRY_VIRTUALENVS_CREATE=false poetry install --only main --no-interaction \
&& rm -rf ~/.cache ~/.local /tmp/poetry
RUN cd /tmp/poetry \
&& poetry install --only main --no-directory --no-interaction \
&& ln -s $(poetry env info -p)/bin ~/.bin \
&& rm -rf /tmp/poetry

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

0 comments on commit a06fb20

Please sign in to comment.