Files
qemu/tests/docker/dockerfiles/debian-toolchain.docker
John Snow e2d4646a02 tests/docker: upgrade most non-lcitool debian tests to debian 13
Debian 11 was EOL in 2024, and Debian 12 will be EOL this June. This
patch moves all but one of our tests, debian-legacy-test-cross, onto
Debian 13.

This patch does the bare minimum to upgrade these tests and doesn't make
any attempt at optimization or cleanup that may or may not be possible
with this upgrade.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[AJB: tweak summary line]
Message-ID: <20260226185303.1920021-2-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2026-02-27 12:09:25 +00:00

51 lines
1.6 KiB
Docker

#
# Docker toolchain cross-compiler
#
# This dockerfile is used for building a cross-compiler toolchain.
# The script for building the toolchain is supplied via extra-files.
#
FROM docker.io/library/debian:13-slim
# Install build utilities for building gcc and glibc.
# ??? The build-dep isn't working, missing a number of
# minimal build dependiencies, e.g. libmpc.
# Add deb-src repository sources
RUN sed -i "s/^Types: deb$/Types: deb deb-src/" \
/etc/apt/sources.list.d/debian.sources
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
bison \
ca-certificates \
flex \
gawk \
libmpc-dev \
libmpfr-dev \
rsync \
wget && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt build-dep -yy --arch-only gcc glibc
ADD build-toolchain.sh /root/build-toolchain.sh
RUN cd /root && ./build-toolchain.sh
# Throw away the extra toolchain build deps, the downloaded source,
# and the build trees by restoring the original image,
# then copying the built toolchain from stage 0.
FROM docker.io/library/debian:13-slim
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt install -y --no-install-recommends \
libmpc3
COPY --from=0 /usr/local /usr/local
# As a final step configure the user (if env is defined)
ARG USER
ARG UID
RUN if [ "${USER}" ]; then \
id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi