137137buildDir=" ${CURDIR} /build/${TARGETPLATFORM} "
138138
139139dockerCLIBuildDir=" ${buildDir} /docker-cli"
140- dockerBuildDir=" ${buildDir} /docker-engine"
140+ dockerEngineBuildDir=" ${buildDir} /docker-engine"
141+ dockerBuildDir=" ${buildDir} /docker"
141142containerdBuildDir=" ${buildDir} /containerd"
142143rootlessExtrasBuildDir=" ${buildDir} /docker-rootless-extras"
143144buildxBuildDir=" ${buildDir} /docker-buildx"
@@ -195,12 +196,12 @@ case ${TARGETOS} in
195196esac
196197
197198# docker, containerd, and runc
198- mkdir -p " ${dockerBuildDir } "
199+ mkdir -p " ${dockerEngineBuildDir } "
199200case ${TARGETOS} in
200201 linux)
201202 for f in dockerd docker-init docker-proxy; do
202203 if [ -f " ${ENGINE_DIR} /build/${targetPair} /$f " ]; then
203- cp -L " ${ENGINE_DIR} /build/${targetPair} /$f " " ${dockerBuildDir } /$f "
204+ cp -L " ${ENGINE_DIR} /build/${targetPair} /$f " " ${dockerEngineBuildDir } /$f "
204205 fi
205206 done
206207 # 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
214215 windows)
215216 for f in dockerd.exe docker-proxy.exe; do
216217 if [ -f " ${ENGINE_DIR} /build/${targetPair} /$f " ]; then
217- cp -L " ${ENGINE_DIR} /build/${targetPair} /$f " " ${dockerBuildDir } /$f "
218+ cp -L " ${ENGINE_DIR} /build/${targetPair} /$f " " ${dockerEngineBuildDir } /$f "
218219 fi
219220 done
220221 ;;
@@ -243,6 +244,28 @@ case ${TARGETOS} in
243244 ;;
244245esac
245246
247+ # docker CLI + docker engine
248+ # TODO: for backward compat keep a copy of the old docker.tgz for now
249+ mkdir -p " ${dockerBuildDir} "
250+ cp " ${dockerCLIBuildDir} " /* " ${dockerBuildDir} /"
251+ cp " ${dockerEngineBuildDir} " /* " ${dockerBuildDir} /"
252+ # package docker
253+ case ${TARGETOS} in
254+ linux | darwin)
255+ (
256+ set -x
257+ tar -C " ${buildDir} " -c -z -f " ${buildDir} /docker-${GEN_STATIC_VER} .tgz" docker
258+ )
259+ ;;
260+ windows)
261+ (
262+ cd " ${buildDir} "
263+ set -x
264+ zip -r " docker-${GEN_STATIC_VER} .zip" docker
265+ )
266+ ;;
267+ esac
268+
246269# rootless extras
247270case ${TARGETOS} in
248271 linux)
0 commit comments