From 4b6391655e09849208fe0820e5be19f39e373b9a Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 25 Jan 2023 15:40:24 +0100 Subject: [PATCH] static: for backward compat keep docker.tgz Signed-off-by: CrazyMax --- static/build-static | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/static/build-static b/static/build-static index 61ad167fe0..8d0c4a420d 100755 --- a/static/build-static +++ b/static/build-static @@ -137,7 +137,8 @@ fi buildDir="${CURDIR}/build/${TARGETPLATFORM}" dockerCLIBuildDir="${buildDir}/docker-cli" -dockerBuildDir="${buildDir}/docker-engine" +dockerEngineBuildDir="${buildDir}/docker-engine" +dockerBuildDir="${buildDir}/docker" containerdBuildDir="${buildDir}/containerd" rootlessExtrasBuildDir="${buildDir}/docker-rootless-extras" buildxBuildDir="${buildDir}/docker-buildx" @@ -195,12 +196,12 @@ case ${TARGETOS} in esac # docker, containerd, and runc -mkdir -p "${dockerBuildDir}" +mkdir -p "${dockerEngineBuildDir}" case ${TARGETOS} in linux) for f in dockerd docker-init docker-proxy; do if [ -f "${ENGINE_DIR}/build/${targetPair}/$f" ]; then - cp -L "${ENGINE_DIR}/build/${targetPair}/$f" "${dockerBuildDir}/$f" + cp -L "${ENGINE_DIR}/build/${targetPair}/$f" "${dockerEngineBuildDir}/$f" fi done # TODO containerd binaries should be built as part of containerd-packaging, not as part of docker/docker-ce-packaging @@ -214,7 +215,7 @@ case ${TARGETOS} in windows) for f in dockerd.exe docker-proxy.exe; do if [ -f "${ENGINE_DIR}/build/${targetPair}/$f" ]; then - cp -L "${ENGINE_DIR}/build/${targetPair}/$f" "${dockerBuildDir}/$f" + cp -L "${ENGINE_DIR}/build/${targetPair}/$f" "${dockerEngineBuildDir}/$f" fi done ;; @@ -243,6 +244,28 @@ case ${TARGETOS} in ;; esac +# docker CLI + docker engine +# TODO: for backward compat keep a copy of the old docker.tgz for now +mkdir -p "${dockerBuildDir}" +cp "${dockerCLIBuildDir}"/* "${dockerBuildDir}/" +cp "${dockerEngineBuildDir}"/* "${dockerBuildDir}/" +# package docker +case ${TARGETOS} in + linux | darwin) + ( + set -x + tar -C "${buildDir}" -c -z -f "${buildDir}/docker-${GEN_STATIC_VER}.tgz" docker + ) + ;; + windows) + ( + cd "${buildDir}" + set -x + zip -r "docker-${GEN_STATIC_VER}.zip" docker + ) + ;; +esac + # rootless extras case ${TARGETOS} in linux)