diff --git a/pkg/docker-cli/Dockerfile b/pkg/docker-cli/Dockerfile index 49a6b1b8..bcdd1f21 100644 --- a/pkg/docker-cli/Dockerfile +++ b/pkg/docker-cli/Dockerfile @@ -184,7 +184,27 @@ ARG GOVERSIONINFO_VERSION RUN --mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw \ GOBIN=/out GO111MODULE=on go install "github.com/josephspurrier/goversioninfo/cmd/goversioninfo@${GOVERSIONINFO_VERSION}" -FROM build-base-static AS builder-static +FROM build-base-static AS builder-static-nosdk +ARG DEBIAN_FRONTEND +RUN apt-get install -y --no-install-recommends dpkg-dev clang lld llvm make pkg-config +ARG PKG_NAME +ARG DOCKER_CLI_REF +ARG NIGHTLY_BUILD +WORKDIR /build +ARG TARGETPLATFORM +RUN xx-apt-get install -y gcc libc6-dev +RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/pkg-static-build \ + --mount=type=bind,from=common-scripts,source=gen-ver.sh,target=/usr/local/bin/gen-ver \ + --mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ + --mount=type=bind,from=src,source=/src,target=/go/src/github.com/docker/cli,rw \ + --mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw \ + --mount=type=bind,from=goversioninfo,source=/out/goversioninfo,target=/usr/bin/goversioninfo \ + --mount=type=tmpfs,target=/go/src/github.com/docker/cli/winresources \ + OUTDIR=/out BUILDDIR=/build SRCDIR=/go/src/github.com/docker/cli pkg-static-build +FROM builder-static-nosdk AS builder-static-linux +FROM builder-static-nosdk AS builder-static-windows + +FROM build-base-static AS builder-static-darwin ARG DEBIAN_FRONTEND RUN apt-get install -y --no-install-recommends dpkg-dev clang lld llvm make pkg-config ARG PKG_NAME @@ -203,6 +223,8 @@ RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/p --mount=type=tmpfs,target=/go/src/github.com/docker/cli/winresources \ OUTDIR=/out BUILDDIR=/build SRCDIR=/go/src/github.com/docker/cli pkg-static-build +FROM builder-static-$TARGETOS AS builder-static + FROM builder-${PKG_TYPE} AS build-pkg ARG BUILDKIT_SBOM_SCAN_STAGE=true diff --git a/pkg/docker-cli/Makefile b/pkg/docker-cli/Makefile index 57f22881..fba76fcc 100644 --- a/pkg/docker-cli/Makefile +++ b/pkg/docker-cli/Makefile @@ -29,7 +29,7 @@ export PKG_RPM_RELEASE = 3 PKG_LIST ?= deb rpm static # supported platforms: https://github.com/docker/cli/blob/master/docker-bake.hcl#L30-L42 # FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/386 linux/amd64 linux/arm/v6 linux/arm/v7 linux/arm64 linux/riscv64 linux/s390x windows/amd64 windows/arm64 +PKG_PLATFORMS ?= darwin/amd64 darwin/arm64 linux/386 linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/riscv64 linux/s390x windows/amd64 windows/arm64 .PHONY: default default: pkg ; diff --git a/pkg/docker-engine/Makefile b/pkg/docker-engine/Makefile index a992a5cb..130795ec 100644 --- a/pkg/docker-engine/Makefile +++ b/pkg/docker-engine/Makefile @@ -29,7 +29,7 @@ export PKG_RPM_RELEASE = 3 PKG_LIST ?= deb rpm static # supported platforms: https://github.com/moby/moby/blob/master/docker-bake.hcl#L93-L101 # FIXME: add linux/ppc64le when a remote PowerPC instance is available (too slow with QEMU) -PKG_PLATFORMS ?= linux/amd64 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 +PKG_PLATFORMS ?= linux/amd64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm64 linux/s390x windows/amd64 .PHONY: default default: pkg ;