File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ BUILDX_DIR=$(realpath $(CURDIR)/../src/github.com/docker/buildx)
6
6
COMPOSE_DIR =$(realpath $(CURDIR ) /../src/github.com/docker/compose)
7
7
8
8
GEN_STATIC_VER =$(shell ./gen-static-ver $(CLI_DIR ) $(VERSION ) )
9
+ CONTAINERD_PKG_VER =$(shell ./gen-containerd-ver $(ENGINE_DIR ) $(CONTAINERD_VERSION ) )
10
+
9
11
HASH_CMD =docker run -v $(CURDIR ) :/sum -w /sum debian:jessie bash hash_files
10
12
DIR_TO_HASH: =build/linux
11
13
DOCKER_CLI_GOLANG_IMG =golang:$(GO_VERSION )
@@ -58,16 +60,7 @@ static-linux: static-cli static-engine static-buildx-plugin static-compose-plugi
58
60
for f in containerd ctr containerd-shim-runc-v2 runc; do \
59
61
cp -L $(ENGINE_DIR)/bundles/binary-daemon/$$f build/linux/containerd/$$f; \
60
62
done
61
-
62
- # Select the default version of containerd based on the docker engine source,
63
- # which is needed for naming the produced .tgz file.
64
- # TODO containerd binaries should be built as part of containerd-packaging, not as part of docker/docker-ce-packaging
65
- set -ex; if [ -z "$(CONTAINERD_VERSION)" ]; then \
66
- export containerd_pkg_version="$$(awk -F'=' '$$1 == "ARG CONTAINERD_VERSION" {{sub("v","")}; print $$2 }' "$(ENGINE_DIR)/Dockerfile.windows")"; \
67
- else \
68
- export containerd_pkg_version="$(CONTAINERD_VERSION:v%=%)"; \
69
- fi \
70
- && tar -C build/linux -c -z -f build/linux/containerd-$${containerd_pkg_version}.tgz containerd
63
+ tar -C build/linux -c -z -f build/linux/containerd-$(CONTAINERD_PKG_VER).tgz containerd
71
64
72
65
# extra binaries for running rootless
73
66
mkdir -p build/linux/docker-rootless-extras
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ engine_dir=" $1 "
4
+ # containerd_pkg_version is used to name the containerd-<version>.tgz file.
5
+ containerd_pkg_version=" $2 "
6
+
7
+ if [ -z " ${containerd_pkg_version} " ]; then
8
+ # If no custom version is set for containerd, we select the default version of
9
+ # containerd based on the docker engine source.
10
+ # which is needed for naming the produced .tgz file.
11
+ # TODO containerd binaries should be built as part of containerd-packaging, not as part of docker/docker-ce-packaging
12
+ awk -F' =' ' $1 == "ARG CONTAINERD_VERSION" {{sub("v","")}; print $2 }' " ${engine_dir} /Dockerfile.windows"
13
+ else
14
+ echo " ${containerd_pkg_version# v} "
15
+ fi
You can’t perform that action at this time.
0 commit comments