qemu/tests/docker/dockerfiles/debian-toolchain.docker
Alex Bennée 483c3b17ae tests/dockerfiles: unify debian-toolchain references
We use the debian release number elsewhere so fix it for consistency
along with the broken comment.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230228190653.1602033-15-alex.bennee@linaro.org>
2023-03-01 10:32:25 +00:00

37 lines
1.1 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:11-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.
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:11-slim
COPY --from=0 /usr/local /usr/local