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:
parent
a63f218501
commit
46d302b94c
|
@ -209,6 +209,9 @@ RUN NEEDEDVERSION="20200925"; \
|
|||
# the final image
|
||||
FROM ${VENDOR}:${DISTRO}
|
||||
|
||||
ARG VENDOR
|
||||
ARG DISTRO
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get -y update && \
|
||||
|
@ -228,6 +231,17 @@ RUN apt-get -y update && apt-get install -y --no-install-recommends \
|
|||
apt-utils \
|
||||
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
|
||||
|
|
|
@ -28,11 +28,13 @@ fi
|
|||
|
||||
set -e
|
||||
# create docker image for Debian package build
|
||||
cp debian/control debian/docker/debian-control-${VENDOR}-${DISTRO}
|
||||
${DOCKER} build \
|
||||
-f debian/docker/Dockerfile \
|
||||
--build-arg DISTRO=${DISTRO} \
|
||||
--build-arg VENDOR=${VENDOR} \
|
||||
-t acrn-pkg-builder:${DISTRO} debian/docker
|
||||
rm debian/docker/debian-control-${VENDOR}-${DISTRO}
|
||||
|
||||
# build ACRN packages
|
||||
${DOCKER} run \
|
||||
|
|
Loading…
Reference in New Issue