Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
PKG_REPO=${{ inputs.engine-repo }}
PKG_REF=${{ inputs.engine-ref }}
DOCKER_VERSION=${{ inputs.version }}
DOCKER_PLATFORM_NAME=Docker Engine - Community
DOCKER_PRODUCT_LICENSE=Community Engine
PKG_DEB_REVISION=${{ inputs.revision }}
PKG_RPM_RELEASE=${{ inputs.revision }}
dockerhub_username: dockereng
Expand All @@ -89,6 +91,7 @@ jobs:
PKG_REPO=${{ inputs.cli-repo }}
PKG_REF=${{ inputs.cli-ref }}
DOCKER_VERSION=${{ inputs.version }}
DOCKER_PLATFORM_NAME=Docker Engine - Community
PKG_DEB_REVISION=${{ inputs.revision }}
PKG_RPM_RELEASE=${{ inputs.revision }}
dockerhub_username: dockereng
Expand All @@ -113,6 +116,8 @@ jobs:
CLI_REPO=${{ inputs.cli-repo }}
CLI_REF=${{ inputs.cli-ref }}
DOCKER_VERSION=${{ inputs.version }}
DOCKER_PLATFORM_NAME=Docker Engine - Community
DOCKER_PRODUCT_LICENSE=Community Engine
dockerhub_username: dockereng
dockerhub_oidc_connectionid: ${{ vars.DOCKERHUB_OIDC_CONNECTIONID }}

Expand Down
13 changes: 13 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ variable "DOCKER_VERSION" {
description = "Version for Docker, Engine, and CLI packages. If empty, versions are derived from source; combined archives use the Engine version."
default = null
}
variable "DOCKER_PLATFORM_NAME" {
description = "Platform name embedded in Docker CLI and Engine binaries (shown in `docker version`). Only used for docker, docker-cli, and docker-engine packages."
default = null
}
variable "DOCKER_PRODUCT_LICENSE" {
description = "Default product license embedded in Docker Engine binaries (shown in `docker info`). Only used for docker and docker-engine packages."
default = null
}
variable "RUNC_REF" {
description = "Reference (branch, tag, commit) of runc to build. Only used for containerd package. If not set, defaults to the version specified in containerd's script/setup/runc-version file."
default = null
Expand Down Expand Up @@ -625,6 +633,8 @@ target "_pkg-docker" {
CLI_REPO = CLI_REPO != null && CLI_REPO != "" ? CLI_REPO : "https://github.com/docker/cli.git"
CLI_REF = CLI_REF != null && CLI_REF != "" ? CLI_REF : "master"
DOCKER_VERSION = DOCKER_VERSION
DOCKER_PLATFORM_NAME = DOCKER_PLATFORM_NAME
DOCKER_PRODUCT_LICENSE = DOCKER_PRODUCT_LICENSE
GO_VERSION = GO_VERSION != null && GO_VERSION != "" ? GO_VERSION : "1.26.8" # https://github.com/moby/moby/blob/master/Dockerfile
GO_IMAGE_VARIANT = GO_IMAGE_VARIANT != null && GO_IMAGE_VARIANT != "" ? GO_IMAGE_VARIANT : "bookworm"
PKG_REMOTE_DOCKERFILE = "Dockerfile"
Expand All @@ -637,6 +647,7 @@ target "_pkg-docker-cli" {
PKG_REPO = PKG_REPO != null && PKG_REPO != "" ? PKG_REPO : "https://github.com/docker/cli.git"
PKG_REF = PKG_REF != null && PKG_REF != "" ? PKG_REF : "master"
DOCKER_VERSION = DOCKER_VERSION
DOCKER_PLATFORM_NAME = DOCKER_PLATFORM_NAME
GO_VERSION = GO_VERSION != null && GO_VERSION != "" ? GO_VERSION : "1.26.8" # https://github.com/docker/cli/blob/master/Dockerfile
GO_IMAGE_VARIANT = GO_IMAGE_VARIANT != null && GO_IMAGE_VARIANT != "" ? GO_IMAGE_VARIANT : "bookworm"
PKG_DEB_EPOCH = PKG_DEB_EPOCH != null && PKG_DEB_EPOCH != "" ? PKG_DEB_EPOCH : "5"
Expand All @@ -650,6 +661,8 @@ target "_pkg-docker-engine" {
PKG_REPO = PKG_REPO != null && PKG_REPO != "" ? PKG_REPO : "https://github.com/docker/docker.git"
PKG_REF = PKG_REF != null && PKG_REF != "" ? PKG_REF : "master"
DOCKER_VERSION = DOCKER_VERSION
DOCKER_PLATFORM_NAME = DOCKER_PLATFORM_NAME
DOCKER_PRODUCT_LICENSE = DOCKER_PRODUCT_LICENSE
GO_VERSION = GO_VERSION != null && GO_VERSION != "" ? GO_VERSION : "1.26.8" # https://github.com/moby/moby/blob/master/Dockerfile
GO_IMAGE_VARIANT = GO_IMAGE_VARIANT != null && GO_IMAGE_VARIANT != "" ? GO_IMAGE_VARIANT : "bookworm"
PKG_DEB_EPOCH = PKG_DEB_EPOCH != null && PKG_DEB_EPOCH != "" ? PKG_DEB_EPOCH : "5"
Expand Down
2 changes: 2 additions & 0 deletions pkg/docker-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ ARG TARGETPLATFORM
RUN mk-build-deps -t "xx-apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/package/debian/control
WORKDIR /root/package
ARG DOCKER_VERSION
ARG DOCKER_PLATFORM_NAME
ARG NIGHTLY_BUILD
ARG DISTRO_RELEASE
ARG DISTRO_ID
Expand Down Expand Up @@ -151,6 +152,7 @@ RUN --mount=type=bind,from=scripts,source=rpm-builddep.sh,target=/usr/local/bin/
rpm-builddep $(xx-info rhel-arch) /root/rpmbuild/SPECS
WORKDIR /root/rpmbuild
ARG DOCKER_VERSION
ARG DOCKER_PLATFORM_NAME
ARG NIGHTLY_BUILD
ARG DISTRO_RELEASE
ARG DISTRO_ID
Expand Down
4 changes: 3 additions & 1 deletion pkg/docker-cli/scripts/pkg-deb-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

: "${NIGHTLY_BUILD=}"

: "${DOCKER_PLATFORM_NAME=}"

: "${DISTRO_NAME=}"
: "${DISTRO_RELEASE=}"
: "${DISTRO_ID=}"
Expand Down Expand Up @@ -70,5 +72,5 @@ mkdir -p "${pkgoutput}"
set -x

chmod -x debian/control debian/docs debian/*.manpages
VERSION=${GENVER_VERSION#v} REVISION=${GENVER_COMMIT_SHORT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch)
PLATFORM="${DOCKER_PLATFORM_NAME}" VERSION=${GENVER_VERSION#v} REVISION=${GENVER_COMMIT_SHORT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch)
cp /root/docker-* "${pkgoutput}"/
4 changes: 3 additions & 1 deletion pkg/docker-cli/scripts/pkg-rpm-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

: "${NIGHTLY_BUILD=}"

: "${DOCKER_PLATFORM_NAME=}"

: "${DISTRO_NAME=}"
: "${DISTRO_RELEASE=}"
: "${DISTRO_ID=}"
Expand Down Expand Up @@ -72,7 +74,7 @@ fi

set -x

rpmbuild --target $(xx-info rhel-arch) $PKG_RPM_BUILDFLAGS "${rpmDefine[@]}" /root/rpmbuild/SPECS/*.spec
PLATFORM="${DOCKER_PLATFORM_NAME}" rpmbuild --target $(xx-info rhel-arch) $PKG_RPM_BUILDFLAGS "${rpmDefine[@]}" /root/rpmbuild/SPECS/*.spec
mkdir -p "${pkgoutput}"
cp ./RPMS/*/*.* "${pkgoutput}"/
if [ "$(ls -A ./SRPMS)" ]; then
Expand Down
4 changes: 4 additions & 0 deletions pkg/docker-engine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ ARG TARGETPLATFORM
RUN mk-build-deps -t "xx-apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/package/debian/control
WORKDIR /root/package
ARG DOCKER_VERSION
ARG DOCKER_PLATFORM_NAME
ARG NIGHTLY_BUILD
ARG DISTRO_RELEASE
ARG DISTRO_ID
Expand Down Expand Up @@ -163,6 +164,7 @@ RUN --mount=type=bind,from=scripts,source=rpm-builddep.sh,target=/usr/local/bin/
EOT
WORKDIR /root/rpmbuild
ARG DOCKER_VERSION
ARG DOCKER_PLATFORM_NAME
ARG NIGHTLY_BUILD
ARG DISTRO_RELEASE
ARG DISTRO_ID
Expand Down Expand Up @@ -201,6 +203,8 @@ RUN --mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw
FROM build-base-static AS builder-static
RUN apt-get install -y --no-install-recommends clang cmake gcc libc6-dev lld llvm make pkg-config
ARG DOCKER_VERSION
ARG DOCKER_PLATFORM_NAME
ARG DOCKER_PRODUCT_LICENSE
ARG PKG_NAME
ARG PKG_REF
ARG NIGHTLY_BUILD
Expand Down
4 changes: 3 additions & 1 deletion pkg/docker-engine/scripts/pkg-deb-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

: "${NIGHTLY_BUILD=}"

: "${DOCKER_PLATFORM_NAME=}"

: "${DISTRO_NAME=}"
: "${DISTRO_RELEASE=}"
: "${DISTRO_ID=}"
Expand Down Expand Up @@ -72,5 +74,5 @@ mkdir -p "${pkgoutput}"
set -x

chmod -x debian/control debian/docs debian/docker-ce.dirs debian/docker-ce.maintscript debian/docker-ce.manpages
VERSION=${GENVER_VERSION#v} REVISION=${GENVER_COMMIT_SHORT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch)
PLATFORM="${DOCKER_PLATFORM_NAME}" VERSION=${GENVER_VERSION#v} REVISION=${GENVER_COMMIT_SHORT} dpkg-buildpackage $PKG_DEB_BUILDFLAGS --host-arch $(xx-info debian-arch) --target-arch $(xx-info debian-arch)
cp /root/docker-* "${pkgoutput}"/
4 changes: 3 additions & 1 deletion pkg/docker-engine/scripts/pkg-rpm-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

: "${NIGHTLY_BUILD=}"

: "${DOCKER_PLATFORM_NAME=}"

: "${DISTRO_NAME=}"
: "${DISTRO_RELEASE=}"
: "${DISTRO_ID=}"
Expand Down Expand Up @@ -95,7 +97,7 @@ fi

set -x

rpmbuild --target $(xx-info rhel-arch) $PKG_RPM_BUILDFLAGS "${rpmDefine[@]}" /root/rpmbuild/SPECS/*.spec
PLATFORM="${DOCKER_PLATFORM_NAME}" rpmbuild --target $(xx-info rhel-arch) $PKG_RPM_BUILDFLAGS "${rpmDefine[@]}" /root/rpmbuild/SPECS/*.spec
mkdir -p "${pkgoutput}"
cp ./RPMS/*/*.* "${pkgoutput}"/
if [ "$(ls -A ./SRPMS)" ]; then
Expand Down
5 changes: 4 additions & 1 deletion pkg/docker-engine/scripts/pkg-static-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

: "${NIGHTLY_BUILD=}"

: "${DOCKER_PLATFORM_NAME=}"
: "${DOCKER_PRODUCT_LICENSE=}"

: "${PKG_NAME=}"

: "${BUILDDIR=/work/build}"
Expand Down Expand Up @@ -59,7 +62,7 @@ mkdir -p ${BUILDDIR}/${PKG_NAME}
(
set -x
pushd ${SRCDIR}
CGO_ENABLED=1 VERSION=${GENVER_VERSION#v} DOCKER_GITCOMMIT=${GENVER_COMMIT_SHORT} ./hack/make.sh binary
CGO_ENABLED=1 VERSION=${GENVER_VERSION#v} DOCKER_GITCOMMIT=${GENVER_COMMIT_SHORT} PLATFORM="${DOCKER_PLATFORM_NAME}" DEFAULT_PRODUCT_LICENSE="${DOCKER_PRODUCT_LICENSE}" ./hack/make.sh binary
mv "./bundles/binary-daemon/dockerd${binext}" "${BUILDDIR}/${PKG_NAME}/"
if [ "$(xx-info os)" != "windows" ]; then
mv "./bundles/binary-daemon/docker-proxy${binext}" "${BUILDDIR}/${PKG_NAME}/"
Expand Down
2 changes: 2 additions & 0 deletions pkg/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ ARG PKG_NAME
ARG PKG_REF
ARG CLI_REF
ARG DOCKER_VERSION
ARG DOCKER_PLATFORM_NAME
ARG DOCKER_PRODUCT_LICENSE
ARG NIGHTLY_BUILD
ARG TAGPREFIX
WORKDIR /build
Expand Down
5 changes: 4 additions & 1 deletion pkg/docker/scripts/pkg-static-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

: "${DOCKER_VERSION=}"

: "${DOCKER_PLATFORM_NAME=}"
: "${DOCKER_PRODUCT_LICENSE=}"

: "${BUILDDIR=/work/build}"
: "${ENGINE_SRCDIR=/work/engine-src}"
: "${CLI_SRCDIR=/work/cli-src}"
Expand Down Expand Up @@ -101,7 +104,7 @@ fetch_git_ref() {
(
set -x
pushd "${ENGINE_SRCDIR}"
CGO_ENABLED=1 VERSION="${version}" DOCKER_GITCOMMIT="${ENGINE_GENVER_COMMIT_SHORT}" ./hack/make.sh binary
CGO_ENABLED=1 VERSION="${version}" DOCKER_GITCOMMIT="${ENGINE_GENVER_COMMIT_SHORT}" PLATFORM="${DOCKER_PLATFORM_NAME}" DEFAULT_PRODUCT_LICENSE="${DOCKER_PRODUCT_LICENSE}" ./hack/make.sh binary
mv "./bundles/binary-daemon/dockerd${binext}" "${engine_builddir}/"
if [ "$(xx-info os)" != "windows" ]; then
mv "./bundles/binary-daemon/docker-proxy${binext}" "${engine_builddir}/"
Expand Down
Loading