fix(docker): remove docker binary from ce/ee images [BE-12917] (#2674)

This commit is contained in:
Devon Steenberg
2026-05-19 09:37:42 +12:00
committed by GitHub
parent c89f34770f
commit e4e8cf4942
9 changed files with 4 additions and 85 deletions
+1 -1
View File
@@ -36,8 +36,8 @@ build-storybook: ## Build and serve the storybook files
.PHONY: deps server-deps client-deps tidy
deps: server-deps client-deps ## Download all client and server build dependancies
## This is empty because the pipeline requires it but ce has no server deps
server-deps: init-dist ## Download dependant server binaries
@./build/download_binaries.sh $(PLATFORM) $(ARCH)
client-deps: ## Install client dependencies
pnpm install
-3
View File
@@ -1,3 +0,0 @@
{
"docker": "v29.4.1"
}
+1 -7
View File
@@ -2,12 +2,6 @@
set -euo pipefail
BUILD_SOURCESDIRECTORY=${BUILD_SOURCESDIRECTORY:-$(pwd)}
BINARY_VERSION_FILE="$BUILD_SOURCESDIRECTORY/binary-version.json"
if [[ ! -f $BINARY_VERSION_FILE ]] ; then
echo 'File $BINARY_VERSION_FILE not found, aborting build.'
exit 1
fi
mkdir -p dist
@@ -22,7 +16,7 @@ GO_VERSION=${GO_VERSION:-$(go version | awk '{print $3}')}
GIT_COMMIT_HASH=${GIT_COMMIT_HASH:-$(git rev-parse --short HEAD)}
# populate dependencies versions
DOCKER_VERSION=$(jq -r '.docker' < "${BINARY_VERSION_FILE}")
DOCKER_VERSION=$(go list -m -f '{{.Version}}' github.com/docker/docker)
COMPOSE_VERSION=$(go list -m -f '{{.Version}}' github.com/docker/compose/v2)
# Kubernetes SDK uses v0.x.y versioning, but official kubectl releases use v1.x.y
# We need to transform the version (e.g., v0.33.2 -> v1.33.2)
-28
View File
@@ -1,28 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
PLATFORM=${1:-"linux"}
ARCH=${2:-"amd64"}
BINARY_VERSION_FILE="./binary-version.json"
dockerVersion=$(jq -r '.docker' < "${BINARY_VERSION_FILE}")
mkdir -p dist
echo "Checking and downloading binaries for docker ${dockerVersion}"
# Determine the binary file names based on the platform
dockerBinary="dist/docker"
if [ "$PLATFORM" == "windows" ]; then
dockerBinary="dist/docker.exe"
fi
# Check and download docker binary
if [ ! -f "$dockerBinary" ]; then
echo "Downloading docker binary..."
/usr/bin/env bash ./build/download_docker_binary.sh "$PLATFORM" "$ARCH" "$dockerVersion"
else
echo "Docker binary already exists, skipping download."
fi
-41
View File
@@ -1,41 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -ne 3 ]]; then
echo "Illegal number of parameters" >&2
exit 1
fi
PLATFORM=$1
ARCH=$2
DOCKER_VERSION=${3:1}
DOWNLOAD_FOLDER=".tmp/download"
if [[ ${PLATFORM} == "darwin" ]]; then
PLATFORM="mac"
fi
if [[ ${ARCH} == "amd64" ]]; then
ARCH="x86_64"
elif [[ ${ARCH} == "arm" ]]; then
ARCH="armhf"
elif [[ ${ARCH} == "arm64" ]]; then
ARCH="aarch64"
elif [[ ${ARCH} == "ppc64le" ]]; then
DOCKER_VERSION="18.06.3-ce"
elif [[ ${ARCH} == "s390x" ]]; then
DOCKER_VERSION="18.06.3-ce"
fi
rm -rf "${DOWNLOAD_FOLDER}"
mkdir -pv "${DOWNLOAD_FOLDER}"
if [[ ${PLATFORM} == "windows" ]]; then
wget --tries=3 --waitretry=30 --quiet -O "${DOWNLOAD_FOLDER}/docker-binaries.zip" "https://download.docker.com/win/static/stable/${ARCH}/docker-${DOCKER_VERSION}.zip"
unzip "${DOWNLOAD_FOLDER}/docker-binaries.zip" -d "${DOWNLOAD_FOLDER}"
mv "${DOWNLOAD_FOLDER}/docker/docker.exe" dist/
else
wget --tries=3 --waitretry=30 --quiet -O "${DOWNLOAD_FOLDER}/docker-binaries.tgz" "https://download.docker.com/${PLATFORM}/static/stable/${ARCH}/docker-${DOCKER_VERSION}.tgz"
tar -xf "${DOWNLOAD_FOLDER}/docker-binaries.tgz" -C "${DOWNLOAD_FOLDER}"
mv "${DOWNLOAD_FOLDER}/docker/docker" dist/
fi
-1
View File
@@ -10,7 +10,6 @@ LABEL org.opencontainers.image.title="Portainer" \
com.docker.extension.publisher-url="https://www.portainer.io" \
com.docker.extension.additional-urls="[{\"title\":\"Website\",\"url\":\"https://www.portainer.io?utm_campaign=DockerCon&utm_source=DockerDesktop\"},{\"title\":\"Documentation\",\"url\":\"https://docs.portainer.io\"},{\"title\":\"Support\",\"url\":\"https://join.slack.com/t/portainer/shared_invite/zt-txh3ljab-52QHTyjCqbe5RibC2lcjKA\"}]"
COPY dist/docker /
COPY dist/mustache-templates /mustache-templates/
COPY dist/portainer /
COPY dist/public /public/
-1
View File
@@ -10,7 +10,6 @@ LABEL org.opencontainers.image.title="Portainer" \
com.docker.extension.publisher-url="https://www.portainer.io" \
com.docker.extension.additional-urls="[{\"title\":\"Website\",\"url\":\"https://www.portainer.io?utm_campaign=DockerCon&utm_source=DockerDesktop\"},{\"title\":\"Documentation\",\"url\":\"https://docs.portainer.io\"},{\"title\":\"Support\",\"url\":\"https://join.slack.com/t/portainer/shared_invite/zt-txh3ljab-52QHTyjCqbe5RibC2lcjKA\"}]"
COPY dist/docker /
COPY dist/mustache-templates /mustache-templates/
COPY dist/portainer /
COPY dist/public /public/
+1 -2
View File
@@ -8,7 +8,6 @@ COPY --from=core /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll
USER ContainerAdministrator
COPY dist/docker.exe /
COPY dist/mustache-templates /mustache-templates/
COPY dist/portainer.exe /
COPY dist/public /public/
@@ -32,4 +31,4 @@ LABEL git_commit=$GIT_COMMIT \
org.opencontainers.image.documentation="https://docs.portainer.io" \
io.portainer.server="true"
ENTRYPOINT ["/portainer.exe"]
ENTRYPOINT ["/portainer.exe"]
+1 -1
View File
@@ -39,7 +39,7 @@ var (
// DepComposeVersion is the version of the Docker Compose plugin shipped with the application.
DepComposeVersion string
// DepDockerVersion is the version of the Docker binary shipped with the application.
// DepDockerVersion is the version of the github.com/docker/docker Go module used by the application.
DepDockerVersion string
// DepKubectlVersion is the version of the Kubectl binary shipped with the application.