Add s390x to cross platforms target

Update build script and buid environment for supporting s390x
Signed-off-by: Frédéric Dalleau <frederic.dalleau@docker.com>
This commit is contained in:
Frédéric Dalleau 2021-06-14 11:06:42 +02:00
parent 3a208c0ff9
commit e93132e273
3 changed files with 10 additions and 4 deletions

View file

@ -98,13 +98,15 @@ RUN dpkg --add-architecture arm64
RUN dpkg --add-architecture armel
RUN dpkg --add-architecture armhf
RUN dpkg --add-architecture ppc64el
RUN dpkg --add-architecture s390x
RUN --mount=type=cache,sharing=locked,id=moby-cross-true-aptlib,target=/var/lib/apt \
--mount=type=cache,sharing=locked,id=moby-cross-true-aptcache,target=/var/cache/apt \
apt-get update && apt-get install -y --no-install-recommends \
crossbuild-essential-arm64 \
crossbuild-essential-armel \
crossbuild-essential-armhf \
crossbuild-essential-ppc64el
crossbuild-essential-ppc64el \
crossbuild-essential-s390x
FROM cross-${CROSS} as dev-base
@ -135,7 +137,8 @@ RUN --mount=type=cache,sharing=locked,id=moby-cross-true-aptlib,target=/var/lib/
libapparmor-dev:arm64 \
libapparmor-dev:armel \
libapparmor-dev:armhf \
libapparmor-dev:ppc64el
libapparmor-dev:ppc64el \
libapparmor-dev:s390x
FROM runtime-dev-cross-${CROSS} AS runtime-dev

View file

@ -69,7 +69,10 @@ hash_files() {
export CC="${CC:-powerpc64le-linux-gnu-gcc}"
export CGO_ENABLED=1
;;
linux/s390x)
export CC="${CC:-s390x-linux-gnu-gcc}"
export CGO_ENABLED=1
;;
esac
fi

View file

@ -12,7 +12,7 @@ if [ -x "${DEST}/../binary-daemon/dockerd-${VERSION}" ]; then
echo "Created symlinks:" "${DEST}/linux/${arch}/"*
fi
DOCKER_CROSSPLATFORMS=${DOCKER_CROSSPLATFORMS:-"linux/amd64 windows/amd64 linux/ppc64le"}
DOCKER_CROSSPLATFORMS=${DOCKER_CROSSPLATFORMS:-"linux/amd64 windows/amd64 linux/ppc64le linux/s390x"}
for platform in ${DOCKER_CROSSPLATFORMS}; do
(