debian: Preinstall build requirements in docker helper

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
This commit is contained in:
Helmut Buchsbaum 2022-05-03 17:35:39 +02:00 committed by acrnsi-robot
parent a63f218501
commit 46d302b94c
2 changed files with 16 additions and 0 deletions

View File

@ -209,6 +209,9 @@ RUN NEEDEDVERSION="20200925"; \
# the final image # the final image
FROM ${VENDOR}:${DISTRO} FROM ${VENDOR}:${DISTRO}
ARG VENDOR
ARG DISTRO
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && \ RUN apt-get -y update && \
@ -228,6 +231,17 @@ RUN apt-get -y update && apt-get install -y --no-install-recommends \
apt-utils \ apt-utils \
sudo sudo
###############################################################################
# pre-install build dependencies
COPY debian-control-${VENDOR}-${DISTRO} /tmp/debian-control
RUN tmpdir=$(mktemp -d) && cd ${tmpdir} && \
mk-build-deps --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' --install /tmp/debian-control && \
cd / && rm -rf ${tmpdir}
###############################################################################
# cleanup apt cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
############################################################################### ###############################################################################
# Mount the topdir of the Debian git repository at /source # Mount the topdir of the Debian git repository at /source

View File

@ -28,11 +28,13 @@ fi
set -e set -e
# create docker image for Debian package build # create docker image for Debian package build
cp debian/control debian/docker/debian-control-${VENDOR}-${DISTRO}
${DOCKER} build \ ${DOCKER} build \
-f debian/docker/Dockerfile \ -f debian/docker/Dockerfile \
--build-arg DISTRO=${DISTRO} \ --build-arg DISTRO=${DISTRO} \
--build-arg VENDOR=${VENDOR} \ --build-arg VENDOR=${VENDOR} \
-t acrn-pkg-builder:${DISTRO} debian/docker -t acrn-pkg-builder:${DISTRO} debian/docker
rm debian/docker/debian-control-${VENDOR}-${DISTRO}
# build ACRN packages # build ACRN packages
${DOCKER} run \ ${DOCKER} run \