mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Commitb5739330d7introduced the use of heredocs in the jessie/stretch dockerfiles. It turns out this was introduced by BuildKit in 2018 along with a standardisation of Dockerfile syntax, and has subsequently been adopted by the docker community. Annotate all dockerfiles with a statement of the syntax in use, and extend README.md details including how to activate BuildKit when it's available but off by default. This allows the containers to be rebuilt following commita0e29b3163("CI: Drop glibc-i386 from the build containers"). Fixes:b5739330d7("automation: fix jessie/stretch images to use archive.debian.org apt repos") Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
55 lines
1.5 KiB
Docker
55 lines
1.5 KiB
Docker
# syntax=docker/dockerfile:1
|
|
FROM --platform=linux/arm64/v8 debian:bookworm AS builder
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV CPPCHECK_VERSION=2.7
|
|
ENV USER root
|
|
|
|
# dependencies for cppcheck build
|
|
RUN apt-get update && \
|
|
apt-get --quiet --yes install \
|
|
curl \
|
|
build-essential \
|
|
python-is-python3 \
|
|
libpcre3-dev
|
|
|
|
RUN mkdir /build
|
|
WORKDIR /build
|
|
|
|
# cppcheck release build (see cppcheck readme.md)
|
|
RUN curl -fsSLO https://github.com/danmar/cppcheck/archive/"$CPPCHECK_VERSION".tar.gz && \
|
|
tar xvzf "$CPPCHECK_VERSION".tar.gz && \
|
|
cd cppcheck-"$CPPCHECK_VERSION" && \
|
|
make install -j$(nproc) \
|
|
MATCHCOMPILER=yes \
|
|
FILESDIR=/usr/share/cppcheck \
|
|
HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function"
|
|
|
|
FROM --platform=linux/arm64/v8 debian:bookworm
|
|
COPY --from=builder /usr/bin/cppcheck /usr/bin/cppcheck
|
|
COPY --from=builder /usr/share/cppcheck /usr/share/cppcheck
|
|
|
|
LABEL maintainer.name="The Xen Project" \
|
|
maintainer.email="xen-devel@lists.xenproject.org"
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV USER root
|
|
|
|
RUN mkdir /build
|
|
WORKDIR /build
|
|
|
|
# dependencies for cppcheck analysis including Xen-only build/cross-build
|
|
RUN apt-get update && \
|
|
apt-get --quiet --yes install \
|
|
build-essential \
|
|
python-is-python3 \
|
|
libpcre3-dev \
|
|
flex \
|
|
bison \
|
|
gcc-arm-linux-gnueabihf \
|
|
gcc-x86-64-linux-gnu \
|
|
&& \
|
|
apt-get autoremove -y && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
|