Browse code

Split binary installers/commit scripts

Originally I worked on this for the multi-stage build Dockerfile
changes. Decided to split this out as we are still waiting for
multi-stage to be available on CI and rebasing these is pretty annoying.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2018/02/17 03:51:30
Showing 20 changed files
... ...
@@ -187,11 +187,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
187 187
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
188 188
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
189 189
 
190
-# Install tomlv, vndr, runc, containerd, tini, docker-proxy dockercli
191
-# Please edit hack/dockerfile/install-binaries.sh to update them.
192
-COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
193
-COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
194
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter
190
+# Install tomlv, vndr, runc, containerd, tini, proxy dockercli
191
+# Please edit hack/dockerfile/install/<name>.installer to update them.
192
+COPY hack/dockerfile/install hack/dockerfile/install
193
+RUN for i in tomlv vndr tini gometalinter proxy dockercli runc containerd; \
194
+		do hack/dockerfile/install/install.sh $i; \
195
+	done
195 196
 ENV PATH=/usr/local/cli:$PATH
196 197
 
197 198
 # Activate bash completion and include Docker's completion if mounted with DOCKER_BASH_COMPLETION_PATH
... ...
@@ -151,14 +151,17 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
151 151
 	debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
152 152
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
153 153
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
154
+#
154 155
 
155
-# Install tomlv, vndr, runc, containerd, tini, docker-proxy
156
-# Please edit hack/dockerfile/install-binaries.sh to update them.
157
-COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
158
-COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
159
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter
156
+# Install tomlv, vndr, runc, containerd, tini, proxy dockercli
157
+# Please edit hack/dockerfile/install/<name>.installer to update them.
158
+COPY hack/dockerfile/install hack/dockerfile/install
159
+RUN for i in tomlv vndr tini gometalinter proxy dockercli runc containerd; \
160
+		do hack/dockerfile/install/install.sh $i; \
161
+	done
160 162
 ENV PATH=/usr/local/cli:$PATH
161 163
 
164
+
162 165
 # Wrap all commands in the "docker-in-docker" script to allow nested containers
163 166
 ENTRYPOINT ["hack/dind"]
164 167
 
... ...
@@ -138,11 +138,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
138 138
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
139 139
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
140 140
 
141
-# Install tomlv, vndr, runc, containerd, tini, docker-proxy
142
-# Please edit hack/dockerfile/install-binaries.sh to update them.
143
-COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
144
-COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
145
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter
141
+# Install tomlv, vndr, runc, containerd, tini, proxy dockercli
142
+# Please edit hack/dockerfile/install/<name>.installer to update them.
143
+COPY hack/dockerfile/install hack/dockerfile/install
144
+RUN for i in tomlv vndr tini gometalinter proxy dockercli runc containerd; \
145
+		do hack/dockerfile/install/install.sh $i; \
146
+	done
146 147
 ENV PATH=/usr/local/cli:$PATH
147 148
 
148 149
 ENTRYPOINT ["hack/dind"]
... ...
@@ -23,7 +23,7 @@ RUN contrib/download-frozen-image-v2.sh /output/docker-frozen-images \
23 23
 
24 24
 # Download Docker CLI binary
25 25
 COPY hack/dockerfile hack/dockerfile
26
-RUN hack/dockerfile/install-binaries.sh dockercli
26
+RUN hack/dockerfile/install.sh dockercli
27 27
 
28 28
 # Set tag and add sources
29 29
 ARG DOCKER_GITCOMMIT
... ...
@@ -136,11 +136,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
136 136
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
137 137
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
138 138
 
139
-# Install tomlv, vndr, runc, containerd, tini, docker-proxy
140
-# Please edit hack/dockerfile/install-binaries.sh to update them.
141
-COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
142
-COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
143
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter
139
+# Install tomlv, vndr, runc, containerd, tini, proxy dockercli
140
+# Please edit hack/dockerfile/install/<name>.installer to update them.
141
+COPY hack/dockerfile/install hack/dockerfile/install
142
+RUN for i in tomlv vndr tini gometalinter proxy dockercli runc containerd; \
143
+		do hack/dockerfile/install/install.sh $i; \
144
+	done
144 145
 ENV PATH=/usr/local/cli:$PATH
145 146
 
146 147
 # Wrap all commands in the "docker-in-docker" script to allow nested containers
... ...
@@ -130,11 +130,12 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
130 130
 	hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
131 131
 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
132 132
 
133
-# Install tomlv, vndr, runc, containerd, tini, docker-proxy
134
-# Please edit hack/dockerfile/install-binaries.sh to update them.
135
-COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
136
-COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
137
-RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter
133
+# Install tomlv, vndr, runc, containerd, tini, proxy dockercli
134
+# Please edit hack/dockerfile/install/<name>.installer to update them.
135
+COPY hack/dockerfile/install hack/dockerfile/install
136
+RUN for i in tomlv vndr tini gometalinter proxy dockercli runc containerd; \
137
+		do hack/dockerfile/install/install.sh $i; \
138
+	done
138 139
 ENV PATH=/usr/local/cli:$PATH
139 140
 
140 141
 # Wrap all commands in the "docker-in-docker" script to allow nested containers
... ...
@@ -50,10 +50,11 @@ ENV GOPATH /go
50 50
 ENV CGO_LDFLAGS -L/lib
51 51
 
52 52
 # Install runc, containerd, tini and docker-proxy
53
-# Please edit hack/dockerfile/install-binaries.sh to update them.
54
-COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
55
-COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
56
-RUN /tmp/install-binaries.sh runc containerd tini proxy dockercli
53
+# Please edit hack/dockerfile/install/<name>.installer to update them.
54
+COPY hack/dockerfile/install hack/dockerfile/install
55
+RUN for i in runc containerd tini proxy dockercli; \
56
+		do hack/dockerfile/install/install.sh $i; \
57
+	done
57 58
 ENV PATH=/usr/local/cli:$PATH
58 59
 
59 60
 ENV AUTO_GOPATH 1
60 61
deleted file mode 100644
... ...
@@ -1,23 +0,0 @@
1
-#!/bin/sh
2
-
3
-# When updating TOMLV_COMMIT, consider updating github.com/BurntSushi/toml
4
-# in vendor.conf accordingly
5
-TOMLV_COMMIT=a368813c5e648fee92e5f6c30e3944ff9d5e8895
6
-
7
-# When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
8
-RUNC_COMMIT=6c55f98695e902427906eed2c799e566e3d3dfb5
9
-
10
-# containerd is also pinned in vendor.conf. When updating the binary
11
-# version you may also need to update the vendor version to pick up bug
12
-# fixes or new APIs.
13
-CONTAINERD_COMMIT=cfd04396dc68220d1cecbe686a6cc3aa5ce3667c # v1.0.2
14
-TINI_COMMIT=949e6facb77383876aeff8a6944dde66b3089574
15
-
16
-# LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
17
-# updating the binary version, consider updating github.com/docker/libnetwork
18
-# in vendor.conf accordingly
19
-LIBNETWORK_COMMIT=ed2130d117c11c542327b4d5216a5db36770bc65
20
-VNDR_COMMIT=a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
21
-
22
-# Linting
23
-GOMETALINTER_COMMIT=bfcc1d6942136fd86eb6f1a6fb328de8398fbd80
24 1
deleted file mode 100755
... ...
@@ -1,176 +0,0 @@
1
-#!/usr/bin/env bash
2
-set -e
3
-set -x
4
-
5
-. $(dirname "$0")/binaries-commits
6
-
7
-RM_GOPATH=0
8
-
9
-TMP_GOPATH=${TMP_GOPATH:-""}
10
-
11
-if [ -z "$TMP_GOPATH" ]; then
12
-	export GOPATH="$(mktemp -d)"
13
-	RM_GOPATH=1
14
-else
15
-	export GOPATH="$TMP_GOPATH"
16
-fi
17
-
18
-# Do not build with ambient capabilities support
19
-RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp apparmor selinux"}"
20
-
21
-install_runc() {
22
-	echo "Install runc version $RUNC_COMMIT"
23
-	git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc"
24
-	cd "$GOPATH/src/github.com/opencontainers/runc"
25
-	git checkout -q "$RUNC_COMMIT"
26
-	make BUILDTAGS="$RUNC_BUILDTAGS" $1
27
-	cp runc /usr/local/bin/docker-runc
28
-}
29
-
30
-install_containerd() {
31
-	echo "Install containerd version $CONTAINERD_COMMIT"
32
-	git clone https://github.com/containerd/containerd.git "$GOPATH/src/github.com/containerd/containerd"
33
-	cd "$GOPATH/src/github.com/containerd/containerd"
34
-	git checkout -q "$CONTAINERD_COMMIT"
35
-	(
36
-		export GOPATH
37
-		make
38
-	)
39
-	cp bin/containerd /usr/local/bin/docker-containerd
40
-	cp bin/containerd-shim /usr/local/bin/docker-containerd-shim
41
-	cp bin/ctr /usr/local/bin/docker-containerd-ctr
42
-}
43
-
44
-install_containerd_static() {
45
-	echo "Install containerd version $CONTAINERD_COMMIT"
46
-	git clone https://github.com/containerd/containerd.git "$GOPATH/src/github.com/containerd/containerd"
47
-	cd "$GOPATH/src/github.com/containerd/containerd"
48
-	git checkout -q "$CONTAINERD_COMMIT"
49
-	(
50
-		export GOPATH
51
-		make BUILDTAGS='static_build netgo' EXTRA_FLAGS="-buildmode pie" EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"'
52
-	)
53
-	cp bin/containerd /usr/local/bin/docker-containerd
54
-	cp bin/containerd-shim /usr/local/bin/docker-containerd-shim
55
-	cp bin/ctr /usr/local/bin/docker-containerd-ctr
56
-}
57
-
58
-install_proxy() {
59
-	echo "Install docker-proxy version $LIBNETWORK_COMMIT"
60
-	git clone https://github.com/docker/libnetwork.git "$GOPATH/src/github.com/docker/libnetwork"
61
-	cd "$GOPATH/src/github.com/docker/libnetwork"
62
-	git checkout -q "$LIBNETWORK_COMMIT"
63
-	go build -buildmode=pie -ldflags="$PROXY_LDFLAGS" -o /usr/local/bin/docker-proxy github.com/docker/libnetwork/cmd/proxy
64
-}
65
-
66
-install_dockercli() {
67
-	DOCKERCLI_CHANNEL=${DOCKERCLI_CHANNEL:-edge}
68
-	DOCKERCLI_VERSION=${DOCKERCLI_VERSION:-17.06.0-ce}
69
-	echo "Install docker/cli version $DOCKERCLI_VERSION from $DOCKERCLI_CHANNEL"
70
-
71
-	arch=$(uname -m)
72
-	# No official release of these platforms
73
-	if [[ "$arch" != "x86_64" ]] && [[ "$arch" != "s390x" ]]; then
74
-		build_dockercli
75
-		return
76
-	fi
77
-
78
-	url=https://download.docker.com/linux/static
79
-	curl -Ls $url/$DOCKERCLI_CHANNEL/$arch/docker-$DOCKERCLI_VERSION.tgz | \
80
-	tar -xz docker/docker
81
-	mv docker/docker /usr/local/bin/
82
-	rmdir docker
83
-}
84
-
85
-build_dockercli() {
86
-	DOCKERCLI_VERSION=${DOCKERCLI_VERSION:-17.06.0-ce}
87
-	git clone https://github.com/docker/docker-ce "$GOPATH/tmp/docker-ce"
88
-	cd "$GOPATH/tmp/docker-ce"
89
-	git checkout -q "v$DOCKERCLI_VERSION"
90
-	mkdir -p "$GOPATH/src/github.com/docker"
91
-	mv components/cli "$GOPATH/src/github.com/docker/cli"
92
-	go build -buildmode=pie -o /usr/local/bin/docker github.com/docker/cli/cmd/docker
93
-}
94
-
95
-install_gometalinter() {
96
-	echo "Installing gometalinter version $GOMETALINTER_COMMIT"
97
-	go get -d github.com/alecthomas/gometalinter
98
-	cd "$GOPATH/src/github.com/alecthomas/gometalinter"
99
-	git checkout -q "$GOMETALINTER_COMMIT"
100
-	go build -buildmode=pie -o /usr/local/bin/gometalinter github.com/alecthomas/gometalinter
101
-	GOBIN=/usr/local/bin gometalinter --install
102
-}
103
-
104
-for prog in "$@"
105
-do
106
-	case $prog in
107
-		tomlv)
108
-			echo "Install tomlv version $TOMLV_COMMIT"
109
-			git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml"
110
-			cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT"
111
-			go build -buildmode=pie -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv
112
-			;;
113
-
114
-		runc)
115
-			install_runc static
116
-			;;
117
-
118
-		runc-dynamic)
119
-			install_runc
120
-			;;
121
-
122
-		containerd)
123
-			install_containerd_static
124
-			;;
125
-
126
-		containerd-dynamic)
127
-			install_containerd
128
-			;;
129
-
130
-		gometalinter)
131
-			install_gometalinter
132
-			;;
133
-
134
-		tini)
135
-			echo "Install tini version $TINI_COMMIT"
136
-			git clone https://github.com/krallin/tini.git "$GOPATH/tini"
137
-			cd "$GOPATH/tini"
138
-			git checkout -q "$TINI_COMMIT"
139
-			cmake .
140
-			make tini-static
141
-			cp tini-static /usr/local/bin/docker-init
142
-			;;
143
-
144
-		proxy)
145
-			(
146
-				export CGO_ENABLED=0
147
-				install_proxy
148
-			)
149
-			;;
150
-
151
-		proxy-dynamic)
152
-			PROXY_LDFLAGS="-linkmode=external" install_proxy
153
-			;;
154
-
155
-		vndr)
156
-			echo "Install vndr version $VNDR_COMMIT"
157
-			git clone https://github.com/LK4D4/vndr.git "$GOPATH/src/github.com/LK4D4/vndr"
158
-			cd "$GOPATH/src/github.com/LK4D4/vndr"
159
-			git checkout -q "$VNDR_COMMIT"
160
-			go build -buildmode=pie -v -o /usr/local/bin/vndr .
161
-			;;
162
-
163
-		dockercli)
164
-			install_dockercli
165
-			;;
166
-
167
-		*)
168
-			echo echo "Usage: $0 [tomlv|runc|runc-dynamic|containerd|containerd-dynamic|tini|proxy|proxy-dynamic|vndr|dockercli|gometalinter]"
169
-			exit 1
170
-
171
-	esac
172
-done
173
-
174
-if [ $RM_GOPATH -eq 1 ]; then
175
-	rm -rf "$GOPATH"
176
-fi
177 1
new file mode 100755
... ...
@@ -0,0 +1,31 @@
0
+#!/bin/sh
1
+
2
+
3
+# containerd is also pinned in vendor.conf. When updating the binary
4
+# version you may also need to update the vendor version to pick up bug
5
+# fixes or new APIs.
6
+CONTAINERD_COMMIT=cfd04396dc68220d1cecbe686a6cc3aa5ce3667c # v1.0.2
7
+
8
+install_containerd() {
9
+	echo "Install containerd version $CONTAINERD_COMMIT"
10
+	git clone https://github.com/containerd/containerd.git "$GOPATH/src/github.com/containerd/containerd"
11
+	cd "$GOPATH/src/github.com/containerd/containerd"
12
+	git checkout -q "$CONTAINERD_COMMIT"
13
+
14
+	(
15
+
16
+		if [ "$1" == "static" ]; then
17
+			export BUILDTAGS='static_build netgo'
18
+			export EXTRA_FLAGS='-buildmod pie'
19
+			export EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"'
20
+		fi
21
+
22
+		make
23
+	)
24
+
25
+	mkdir -p ${PREFIX}
26
+
27
+	cp bin/containerd ${PREFIX}/docker-containerd
28
+	cp bin/containerd-shim ${PREFIX}/docker-containerd-shim
29
+	cp bin/ctr ${PREFIX}/docker-containerd-ctr
30
+}
0 31
new file mode 100755
... ...
@@ -0,0 +1,31 @@
0
+#!/bin/sh
1
+
2
+DOCKERCLI_CHANNEL=${DOCKERCLI_CHANNEL:-edge}
3
+DOCKERCLI_VERSION=${DOCKERCLI_VERSION:-17.06.0-ce}
4
+
5
+install_dockercli() {
6
+	echo "Install docker/cli version $DOCKERCLI_VERSION from $DOCKERCLI_CHANNEL"
7
+
8
+	arch=$(uname -m)
9
+	# No official release of these platforms
10
+	if [[ "$arch" != "x86_64" ]] && [[ "$arch" != "s390x" ]]; then
11
+		build_dockercli
12
+		return
13
+	fi
14
+
15
+	url=https://download.docker.com/linux/static
16
+	curl -Ls $url/$DOCKERCLI_CHANNEL/$arch/docker-$DOCKERCLI_VERSION.tgz | \
17
+	tar -xz docker/docker
18
+	mkdir -p ${PREFIX}
19
+	mv docker/docker ${PREFIX}/
20
+	rmdir docker
21
+}
22
+
23
+build_dockercli() {
24
+	git clone https://github.com/docker/docker-ce "$GOPATH/tmp/docker-ce"
25
+	cd "$GOPATH/tmp/docker-ce"
26
+	git checkout -q "v$DOCKERCLI_VERSION"
27
+	mkdir -p "$GOPATH/src/github.com/docker"
28
+	mv components/cli "$GOPATH/src/github.com/docker/cli"
29
+	go build -buildmode=pie -o ${PREFIX}/docker github.com/docker/cli/cmd/docker
30
+}
0 31
new file mode 100755
... ...
@@ -0,0 +1,12 @@
0
+#!/bin/sh
1
+
2
+GOMETALINTER_COMMIT=bfcc1d6942136fd86eb6f1a6fb328de8398fbd80
3
+
4
+install_gometalinter() {
5
+	echo "Installing gometalinter version $GOMETALINTER_COMMIT"
6
+	go get -d github.com/alecthomas/gometalinter
7
+	cd "$GOPATH/src/github.com/alecthomas/gometalinter"
8
+	git checkout -q "$GOMETALINTER_COMMIT"
9
+	go build -buildmode=pie -o ${PREFIX}/gometalinter github.com/alecthomas/gometalinter
10
+	GOBIN=${PREFIX} ${PREFIX}/gometalinter --install
11
+}
0 12
new file mode 100755
... ...
@@ -0,0 +1,30 @@
0
+#!/bin/bash
1
+
2
+set -e
3
+set -x
4
+
5
+RM_GOPATH=0
6
+
7
+TMP_GOPATH=${TMP_GOPATH:-""}
8
+
9
+: ${PREFIX:="/usr/local/bin"}
10
+
11
+if [ -z "$TMP_GOPATH" ]; then
12
+	export GOPATH="$(mktemp -d)"
13
+	RM_GOPATH=1
14
+else
15
+	export GOPATH="$TMP_GOPATH"
16
+fi
17
+
18
+dir="$(dirname $0)"
19
+
20
+bin=$1
21
+shift
22
+
23
+if [ ! -f "${dir}/${bin}.installer" ]; then
24
+	echo "Could not find installer for \"$bin\""
25
+	exit 1
26
+fi
27
+
28
+. $dir/$bin.installer
29
+install_$bin "$@"
0 30
new file mode 100755
... ...
@@ -0,0 +1,37 @@
0
+#!/bin/sh
1
+
2
+# LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
3
+# updating the binary version, consider updating github.com/docker/libnetwork
4
+# in vendor.conf accordingly
5
+LIBNETWORK_COMMIT=ed2130d117c11c542327b4d5216a5db36770bc65
6
+
7
+install_proxy() {
8
+	case "$1" in
9
+		"dynamic")
10
+			install_proxy_dynamic
11
+			return
12
+			;;
13
+		"")
14
+			export CGO_ENABLED=0
15
+			_install_proxy
16
+			;;
17
+		*)
18
+			echo 'Usage: $0 [dynamic]'
19
+			;;
20
+	esac
21
+}
22
+
23
+install_proxy_dynamic() {
24
+	export PROXY_LDFLAGS="-linkmode=external" install_proxy
25
+	_install_proxy
26
+}
27
+
28
+_install_proxy() {
29
+	echo "Install docker-proxy version $LIBNETWORK_COMMIT"
30
+	git clone https://github.com/docker/libnetwork.git "$GOPATH/src/github.com/docker/libnetwork"
31
+	cd "$GOPATH/src/github.com/docker/libnetwork"
32
+	git checkout -q "$LIBNETWORK_COMMIT"
33
+	go build -buildmode=pie -ldflags="$PROXY_LDFLAGS" -o ${PREFIX}/docker-proxy github.com/docker/libnetwork/cmd/proxy
34
+}
35
+
36
+
0 37
new file mode 100755
... ...
@@ -0,0 +1,17 @@
0
+#!/bin/sh
1
+
2
+# When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
3
+RUNC_COMMIT=6c55f98695e902427906eed2c799e566e3d3dfb5
4
+
5
+install_runc() {
6
+	# Do not build with ambient capabilities support
7
+	RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp apparmor selinux"}"
8
+
9
+	echo "Install runc version $RUNC_COMMIT"
10
+	git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc"
11
+	cd "$GOPATH/src/github.com/opencontainers/runc"
12
+	git checkout -q "$RUNC_COMMIT"
13
+	make BUILDTAGS="$RUNC_BUILDTAGS" $1
14
+	mkdir -p ${PREFIX}
15
+	cp runc ${PREFIX}/docker-runc
16
+}
0 17
new file mode 100755
... ...
@@ -0,0 +1,14 @@
0
+#!/bin/sh
1
+
2
+TINI_COMMIT=949e6facb77383876aeff8a6944dde66b3089574
3
+
4
+install_tini() {
5
+	echo "Install tini version $TINI_COMMIT"
6
+	git clone https://github.com/krallin/tini.git "$GOPATH/tini"
7
+	cd "$GOPATH/tini"
8
+	git checkout -q "$TINI_COMMIT"
9
+	cmake .
10
+	make tini-static
11
+	mkdir -p ${PREFIX}
12
+	cp tini-static ${PREFIX}/docker-init
13
+}
0 14
new file mode 100755
... ...
@@ -0,0 +1,12 @@
0
+#!/bin/sh
1
+
2
+# When updating TOMLV_COMMIT, consider updating github.com/BurntSushi/toml
3
+# in vendor.conf accordingly
4
+TOMLV_COMMIT=a368813c5e648fee92e5f6c30e3944ff9d5e8895
5
+
6
+install_tomlv() {
7
+	echo "Install tomlv version $TOMLV_COMMIT"
8
+	git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml"
9
+	cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT"
10
+	go build -v -buildmode=pie -o ${PREFIX}/tomlv github.com/BurntSushi/toml/cmd/tomlv
11
+}
0 12
new file mode 100755
... ...
@@ -0,0 +1,11 @@
0
+#!/bin/sh
1
+
2
+VNDR_COMMIT=a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
3
+
4
+install_vndr() {
5
+	echo "Install vndr version $VNDR_COMMIT"
6
+	git clone https://github.com/LK4D4/vndr.git "$GOPATH/src/github.com/LK4D4/vndr"
7
+	cd "$GOPATH/src/github.com/LK4D4/vndr"
8
+	git checkout -q "$VNDR_COMMIT"
9
+	go build -buildmode=pie -v -o ${PREFIX}/vndr .
10
+}
... ...
@@ -2,7 +2,9 @@
2 2
 
3 3
 rm -rf autogen
4 4
 
5
-source hack/dockerfile/binaries-commits
5
+source hack/dockerfile/install/runc.installer
6
+source hack/dockerfile/install/tini.installer
7
+source hack/dockerfile/install/containerd.installer
6 8
 
7 9
 cat > dockerversion/version_autogen.go <<DVEOF
8 10
 // +build autogen
... ...
@@ -32,7 +32,7 @@ github.com/tonistiigi/fsutil dea3a0da73aee887fc02142d995be764106ac5e2
32 32
 
33 33
 #get libnetwork packages
34 34
 
35
-# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/binaries-commits accordingly
35
+# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy accordingly
36 36
 github.com/docker/libnetwork ed2130d117c11c542327b4d5216a5db36770bc65
37 37
 github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
38 38
 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
... ...
@@ -47,7 +47,7 @@ github.com/docker/libkv 1d8431073ae03cdaedb198a89722f3aab6d418ef
47 47
 github.com/vishvananda/netns 604eaf189ee867d8c147fafc28def2394e878d25
48 48
 github.com/vishvananda/netlink b2de5d10e38ecce8607e6b438b6d174f389a004e
49 49
 
50
-# When updating, consider updating TOMLV_COMMIT in hack/dockerfile/binaries-commits accordingly
50
+# When updating, consider updating TOMLV_COMMIT in hack/dockerfile/install/tomlv accordingly
51 51
 github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895
52 52
 github.com/samuel/go-zookeeper d0e0d8e11f318e000a8cc434616d69e329edc374
53 53
 github.com/deckarep/golang-set ef32fa3046d9f249d399f98ebaf9be944430fd1d
... ...
@@ -70,7 +70,7 @@ github.com/pborman/uuid v1.0
70 70
 
71 71
 google.golang.org/grpc v1.3.0
72 72
 
73
-# When updating, also update RUNC_COMMIT in hack/dockerfile/binaries-commits accordingly
73
+# When updating, also update RUNC_COMMIT in hack/dockerfile/install/runc accordingly
74 74
 github.com/opencontainers/runc 6c55f98695e902427906eed2c799e566e3d3dfb5
75 75
 github.com/opencontainers/runtime-spec v1.0.1
76 76
 github.com/opencontainers/image-spec v1.0.1