project: move go binaries installation to separate script
| ... | ... |
@@ -222,48 +222,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
| 222 | 222 |
hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7 |
| 223 | 223 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
| 224 | 224 |
|
| 225 |
-# Download toml validator |
|
| 226 |
-ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a |
|
| 227 |
-RUN set -x \ |
|
| 228 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 229 |
- && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ |
|
| 230 |
- && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ |
|
| 231 |
- && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ |
|
| 232 |
- && rm -rf "$GOPATH" |
|
| 233 |
- |
|
| 234 |
-# Install runc |
|
| 235 |
-ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28 |
|
| 236 |
-RUN set -x \ |
|
| 237 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 238 |
- && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 239 |
- && cd "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 240 |
- && git checkout -q "$RUNC_COMMIT" \ |
|
| 241 |
- && make static BUILDTAGS="seccomp apparmor selinux" \ |
|
| 242 |
- && cp runc /usr/local/bin/docker-runc \ |
|
| 243 |
- && rm -rf "$GOPATH" |
|
| 244 |
- |
|
| 245 |
-# Install containerd |
|
| 246 |
-ENV CONTAINERD_COMMIT 2545227b0357eb55e369fa0072baef9ad91cdb69 |
|
| 247 |
-RUN set -x \ |
|
| 248 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 249 |
- && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ |
|
| 250 |
- && cd "$GOPATH/src/github.com/docker/containerd" \ |
|
| 251 |
- && git checkout -q "$CONTAINERD_COMMIT" \ |
|
| 252 |
- && make static \ |
|
| 253 |
- && cp bin/containerd /usr/local/bin/docker-containerd \ |
|
| 254 |
- && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ |
|
| 255 |
- && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ |
|
| 256 |
- && rm -rf "$GOPATH" |
|
| 257 |
- |
|
| 258 |
-ENV GRIMES_COMMIT f207601a8d19a534cc90d9e26e037e9931ccb9db |
|
| 259 |
-RUN set -x \ |
|
| 260 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 261 |
- && git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes" \ |
|
| 262 |
- && cd "$GOPATH/grimes" \ |
|
| 263 |
- && git checkout -q "$GRIMES_COMMIT" \ |
|
| 264 |
- && make \ |
|
| 265 |
- && cp init /usr/local/bin/docker-init \ |
|
| 266 |
- && rm -rf "$GOPATH" |
|
| 225 |
+# Install tomlv, runc, containerd.and grimes |
|
| 226 |
+# Please edit hack/dockerfile/install-binaries.sh to update them. |
|
| 227 |
+COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
|
| 228 |
+RUN /tmp/install-binaries.sh tomlv runc containerd grimes |
|
| 267 | 229 |
|
| 268 | 230 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
| 269 | 231 |
ENTRYPOINT ["hack/dind"] |
| ... | ... |
@@ -165,48 +165,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
| 165 | 165 |
aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda |
| 166 | 166 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
| 167 | 167 |
|
| 168 |
-# Download toml validator |
|
| 169 |
-ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a |
|
| 170 |
-RUN set -x \ |
|
| 171 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 172 |
- && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ |
|
| 173 |
- && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ |
|
| 174 |
- && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ |
|
| 175 |
- && rm -rf "$GOPATH" |
|
| 176 |
- |
|
| 177 |
-# Install runc |
|
| 178 |
-ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28 |
|
| 179 |
-RUN set -x \ |
|
| 180 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 181 |
- && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 182 |
- && cd "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 183 |
- && git checkout -q "$RUNC_COMMIT" \ |
|
| 184 |
- && make static BUILDTAGS="seccomp apparmor selinux" \ |
|
| 185 |
- && cp runc /usr/local/bin/docker-runc \ |
|
| 186 |
- && rm -rf "$GOPATH" |
|
| 187 |
- |
|
| 188 |
-# Install containerd |
|
| 189 |
-ENV CONTAINERD_COMMIT 2545227b0357eb55e369fa0072baef9ad91cdb69 |
|
| 190 |
-RUN set -x \ |
|
| 191 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 192 |
- && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ |
|
| 193 |
- && cd "$GOPATH/src/github.com/docker/containerd" \ |
|
| 194 |
- && git checkout -q "$CONTAINERD_COMMIT" \ |
|
| 195 |
- && make static \ |
|
| 196 |
- && cp bin/containerd /usr/local/bin/docker-containerd \ |
|
| 197 |
- && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ |
|
| 198 |
- && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ |
|
| 199 |
- && rm -rf "$GOPATH" |
|
| 200 |
- |
|
| 201 |
-ENV GRIMES_COMMIT f207601a8d19a534cc90d9e26e037e9931ccb9db |
|
| 202 |
-RUN set -x \ |
|
| 203 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 204 |
- && git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes" \ |
|
| 205 |
- && cd "$GOPATH/grimes" \ |
|
| 206 |
- && git checkout -q "$GRIMES_COMMIT" \ |
|
| 207 |
- && make \ |
|
| 208 |
- && cp init /usr/local/bin/docker-init \ |
|
| 209 |
- && rm -rf "$GOPATH" |
|
| 168 |
+# Install tomlv, runc, containerd.and grimes |
|
| 169 |
+# Please edit hack/dockerfile/install-binaries.sh to update them. |
|
| 170 |
+COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
|
| 171 |
+RUN /tmp/install-binaries.sh tomlv runc containerd grimes |
|
| 210 | 172 |
|
| 211 | 173 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
| 212 | 174 |
ENTRYPOINT ["hack/dind"] |
| ... | ... |
@@ -164,48 +164,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
| 164 | 164 |
armhf/hello-world:latest@sha256:161dcecea0225975b2ad5f768058212c1e0d39e8211098666ffa1ac74cfb7791 |
| 165 | 165 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
| 166 | 166 |
|
| 167 |
-# Download toml validator |
|
| 168 |
-ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a |
|
| 169 |
-RUN set -x \ |
|
| 170 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 171 |
- && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ |
|
| 172 |
- && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ |
|
| 173 |
- && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ |
|
| 174 |
- && rm -rf "$GOPATH" |
|
| 175 |
- |
|
| 176 |
-# Install runc |
|
| 177 |
-ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28 |
|
| 178 |
-RUN set -x \ |
|
| 179 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 180 |
- && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 181 |
- && cd "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 182 |
- && git checkout -q "$RUNC_COMMIT" \ |
|
| 183 |
- && make static BUILDTAGS="seccomp apparmor selinux" \ |
|
| 184 |
- && cp runc /usr/local/bin/docker-runc \ |
|
| 185 |
- && rm -rf "$GOPATH" |
|
| 186 |
- |
|
| 187 |
-# Install containerd |
|
| 188 |
-ENV CONTAINERD_COMMIT 2545227b0357eb55e369fa0072baef9ad91cdb69 |
|
| 189 |
-RUN set -x \ |
|
| 190 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 191 |
- && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ |
|
| 192 |
- && cd "$GOPATH/src/github.com/docker/containerd" \ |
|
| 193 |
- && git checkout -q "$CONTAINERD_COMMIT" \ |
|
| 194 |
- && make static \ |
|
| 195 |
- && cp bin/containerd /usr/local/bin/docker-containerd \ |
|
| 196 |
- && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ |
|
| 197 |
- && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ |
|
| 198 |
- && rm -rf "$GOPATH" |
|
| 199 |
- |
|
| 200 |
-ENV GRIMES_COMMIT f207601a8d19a534cc90d9e26e037e9931ccb9db |
|
| 201 |
-RUN set -x \ |
|
| 202 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 203 |
- && git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes" \ |
|
| 204 |
- && cd "$GOPATH/grimes" \ |
|
| 205 |
- && git checkout -q "$GRIMES_COMMIT" \ |
|
| 206 |
- && make \ |
|
| 207 |
- && cp init /usr/local/bin/docker-init \ |
|
| 208 |
- && rm -rf "$GOPATH" |
|
| 167 |
+# Install tomlv, runc, containerd.and grimes |
|
| 168 |
+# Please edit hack/dockerfile/install-binaries.sh to update them. |
|
| 169 |
+COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
|
| 170 |
+RUN /tmp/install-binaries.sh tomlv runc containerd grimes |
|
| 209 | 171 |
|
| 210 | 172 |
ENTRYPOINT ["hack/dind"] |
| 211 | 173 |
|
| ... | ... |
@@ -183,48 +183,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
| 183 | 183 |
ppc64le/hello-world:latest@sha256:186a40a9a02ca26df0b6c8acdfb8ac2f3ae6678996a838f977e57fac9d963974 |
| 184 | 184 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
| 185 | 185 |
|
| 186 |
-# Download toml validator |
|
| 187 |
-ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a |
|
| 188 |
-RUN set -x \ |
|
| 189 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 190 |
- && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ |
|
| 191 |
- && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ |
|
| 192 |
- && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ |
|
| 193 |
- && rm -rf "$GOPATH" |
|
| 194 |
- |
|
| 195 |
-# Install runc |
|
| 196 |
-ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28 |
|
| 197 |
-RUN set -x \ |
|
| 198 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 199 |
- && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 200 |
- && cd "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 201 |
- && git checkout -q "$RUNC_COMMIT" \ |
|
| 202 |
- && make static BUILDTAGS="apparmor seccomp selinux" \ |
|
| 203 |
- && cp runc /usr/local/bin/docker-runc \ |
|
| 204 |
- && rm -rf "$GOPATH" |
|
| 205 |
- |
|
| 206 |
-# Install containerd |
|
| 207 |
-ENV CONTAINERD_COMMIT 2545227b0357eb55e369fa0072baef9ad91cdb69 |
|
| 208 |
-RUN set -x \ |
|
| 209 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 210 |
- && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ |
|
| 211 |
- && cd "$GOPATH/src/github.com/docker/containerd" \ |
|
| 212 |
- && git checkout -q "$CONTAINERD_COMMIT" \ |
|
| 213 |
- && make static \ |
|
| 214 |
- && cp bin/containerd /usr/local/bin/docker-containerd \ |
|
| 215 |
- && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ |
|
| 216 |
- && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ |
|
| 217 |
- && rm -rf "$GOPATH" |
|
| 218 |
- |
|
| 219 |
-ENV GRIMES_COMMIT f207601a8d19a534cc90d9e26e037e9931ccb9db |
|
| 220 |
-RUN set -x \ |
|
| 221 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 222 |
- && git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes" \ |
|
| 223 |
- && cd "$GOPATH/grimes" \ |
|
| 224 |
- && git checkout -q "$GRIMES_COMMIT" \ |
|
| 225 |
- && make \ |
|
| 226 |
- && cp init /usr/local/bin/docker-init \ |
|
| 227 |
- && rm -rf "$GOPATH" |
|
| 186 |
+# Install tomlv, runc, containerd.and grimes |
|
| 187 |
+# Please edit hack/dockerfile/install-binaries.sh to update them. |
|
| 188 |
+COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
|
| 189 |
+RUN /tmp/install-binaries.sh tomlv runc containerd grimes |
|
| 228 | 190 |
|
| 229 | 191 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
| 230 | 192 |
ENTRYPOINT ["hack/dind"] |
| ... | ... |
@@ -175,48 +175,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ |
| 175 | 175 |
s390x/hello-world:latest@sha256:780d80b3a7677c3788c0d5cd9168281320c8d4a6d9183892d8ee5cdd610f5699 |
| 176 | 176 |
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is) |
| 177 | 177 |
|
| 178 |
-# Download toml validator |
|
| 179 |
-ENV TOMLV_COMMIT 9baf8a8a9f2ed20a8e54160840c492f937eeaf9a |
|
| 180 |
-RUN set -x \ |
|
| 181 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 182 |
- && git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" \ |
|
| 183 |
- && (cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT") \ |
|
| 184 |
- && go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv \ |
|
| 185 |
- && rm -rf "$GOPATH" |
|
| 186 |
- |
|
| 187 |
-# Install runc |
|
| 188 |
-ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28 |
|
| 189 |
-RUN set -x \ |
|
| 190 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 191 |
- && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 192 |
- && cd "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 193 |
- && git checkout -q "$RUNC_COMMIT" \ |
|
| 194 |
- && make static BUILDTAGS="seccomp apparmor selinux" \ |
|
| 195 |
- && cp runc /usr/local/bin/docker-runc \ |
|
| 196 |
- && rm -rf "$GOPATH" |
|
| 197 |
- |
|
| 198 |
-# Install containerd |
|
| 199 |
-ENV CONTAINERD_COMMIT 2545227b0357eb55e369fa0072baef9ad91cdb69 |
|
| 200 |
-RUN set -x \ |
|
| 201 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 202 |
- && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ |
|
| 203 |
- && cd "$GOPATH/src/github.com/docker/containerd" \ |
|
| 204 |
- && git checkout -q "$CONTAINERD_COMMIT" \ |
|
| 205 |
- && make static \ |
|
| 206 |
- && cp bin/containerd /usr/local/bin/docker-containerd \ |
|
| 207 |
- && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ |
|
| 208 |
- && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ |
|
| 209 |
- && rm -rf "$GOPATH" |
|
| 210 |
- |
|
| 211 |
-ENV GRIMES_COMMIT f207601a8d19a534cc90d9e26e037e9931ccb9db |
|
| 212 |
-RUN set -x \ |
|
| 213 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 214 |
- && git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes" \ |
|
| 215 |
- && cd "$GOPATH/grimes" \ |
|
| 216 |
- && git checkout -q "$GRIMES_COMMIT" \ |
|
| 217 |
- && make \ |
|
| 218 |
- && cp init /usr/local/bin/docker-init \ |
|
| 219 |
- && rm -rf "$GOPATH" |
|
| 178 |
+# Install tomlv, runc, containerd.and grimes |
|
| 179 |
+# Please edit hack/dockerfile/install-binaries.sh to update them. |
|
| 180 |
+COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
|
| 181 |
+RUN /tmp/install-binaries.sh tomlv runc containerd grimes |
|
| 220 | 182 |
|
| 221 | 183 |
# Wrap all commands in the "docker-in-docker" script to allow nested containers |
| 222 | 184 |
ENTRYPOINT ["hack/dind"] |
| ... | ... |
@@ -56,39 +56,10 @@ ENV PATH /go/bin:/usr/local/go/bin:$PATH |
| 56 | 56 |
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor |
| 57 | 57 |
ENV CGO_LDFLAGS -L/lib |
| 58 | 58 |
|
| 59 |
-# Install runc |
|
| 60 |
-ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28 |
|
| 61 |
-RUN set -x \ |
|
| 62 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 63 |
- && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 64 |
- && cd "$GOPATH/src/github.com/opencontainers/runc" \ |
|
| 65 |
- && git checkout -q "$RUNC_COMMIT" \ |
|
| 66 |
- && make static BUILDTAGS="seccomp apparmor selinux" \ |
|
| 67 |
- && cp runc /usr/local/bin/docker-runc \ |
|
| 68 |
- && rm -rf "$GOPATH" |
|
| 69 |
- |
|
| 70 |
-# Install containerd |
|
| 71 |
-ENV CONTAINERD_COMMIT 2545227b0357eb55e369fa0072baef9ad91cdb69 |
|
| 72 |
-RUN set -x \ |
|
| 73 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 74 |
- && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ |
|
| 75 |
- && cd "$GOPATH/src/github.com/docker/containerd" \ |
|
| 76 |
- && git checkout -q "$CONTAINERD_COMMIT" \ |
|
| 77 |
- && make static \ |
|
| 78 |
- && cp bin/containerd /usr/local/bin/docker-containerd \ |
|
| 79 |
- && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ |
|
| 80 |
- && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ |
|
| 81 |
- && rm -rf "$GOPATH" |
|
| 82 |
- |
|
| 83 |
-ENV GRIMES_COMMIT f207601a8d19a534cc90d9e26e037e9931ccb9db |
|
| 84 |
-RUN set -x \ |
|
| 85 |
- && export GOPATH="$(mktemp -d)" \ |
|
| 86 |
- && git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes" \ |
|
| 87 |
- && cd "$GOPATH/grimes" \ |
|
| 88 |
- && git checkout -q "$GRIMES_COMMIT" \ |
|
| 89 |
- && make \ |
|
| 90 |
- && cp init /usr/local/bin/docker-init \ |
|
| 91 |
- && rm -rf "$GOPATH" |
|
| 59 |
+# Install runc, containerd.and grimes |
|
| 60 |
+# Please edit hack/dockerfile/install-binaries.sh to update them. |
|
| 61 |
+COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh |
|
| 62 |
+RUN /tmp/install-binaries.sh runc containerd grimes |
|
| 92 | 63 |
|
| 93 | 64 |
ENV AUTO_GOPATH 1 |
| 94 | 65 |
WORKDIR /usr/src/docker |
| 95 | 66 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,58 @@ |
| 0 |
+#!/bin/sh |
|
| 1 |
+set -e |
|
| 2 |
+set -x |
|
| 3 |
+ |
|
| 4 |
+TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a |
|
| 5 |
+RUNC_COMMIT=cc29e3dded8e27ba8f65738f40d251c885030a28 |
|
| 6 |
+CONTAINERD_COMMIT=2545227b0357eb55e369fa0072baef9ad91cdb69 |
|
| 7 |
+GRIMES_COMMIT=f207601a8d19a534cc90d9e26e037e9931ccb9db |
|
| 8 |
+ |
|
| 9 |
+export GOPATH="$(mktemp -d)" |
|
| 10 |
+ |
|
| 11 |
+for prog in "$@" |
|
| 12 |
+do |
|
| 13 |
+ case $prog in |
|
| 14 |
+ tomlv) |
|
| 15 |
+ echo "Install tomlv version $TOMLV_COMMIT" |
|
| 16 |
+ git clone https://github.com/BurntSushi/toml.git "$GOPATH/src/github.com/BurntSushi/toml" |
|
| 17 |
+ cd "$GOPATH/src/github.com/BurntSushi/toml" && git checkout -q "$TOMLV_COMMIT" |
|
| 18 |
+ go build -v -o /usr/local/bin/tomlv github.com/BurntSushi/toml/cmd/tomlv |
|
| 19 |
+ ;; |
|
| 20 |
+ |
|
| 21 |
+ 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 static BUILDTAGS="seccomp apparmor selinux" |
|
| 27 |
+ cp runc /usr/local/bin/docker-runc |
|
| 28 |
+ ;; |
|
| 29 |
+ |
|
| 30 |
+ containerd) |
|
| 31 |
+ echo "Install containerd version $CONTAINERD_COMMIT" |
|
| 32 |
+ git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" |
|
| 33 |
+ cd "$GOPATH/src/github.com/docker/containerd" |
|
| 34 |
+ git checkout -q "$CONTAINERD_COMMIT" |
|
| 35 |
+ make static |
|
| 36 |
+ cp bin/containerd /usr/local/bin/docker-containerd |
|
| 37 |
+ cp bin/containerd-shim /usr/local/bin/docker-containerd-shim |
|
| 38 |
+ cp bin/ctr /usr/local/bin/docker-containerd-ctr |
|
| 39 |
+ ;; |
|
| 40 |
+ |
|
| 41 |
+ grimes) |
|
| 42 |
+ echo "Install grimes version $GRIMES_COMMIT" |
|
| 43 |
+ git clone https://github.com/crosbymichael/grimes.git "$GOPATH/grimes" |
|
| 44 |
+ cd "$GOPATH/grimes" |
|
| 45 |
+ git checkout -q "$GRIMES_COMMIT" |
|
| 46 |
+ make |
|
| 47 |
+ cp init /usr/local/bin/docker-init |
|
| 48 |
+ ;; |
|
| 49 |
+ |
|
| 50 |
+ *) |
|
| 51 |
+ echo echo "Usage: $0 [tomlv|runc|containerd|grimes]" |
|
| 52 |
+ exit 1 |
|
| 53 |
+ |
|
| 54 |
+ esac |
|
| 55 |
+done |
|
| 56 |
+ |
|
| 57 |
+rm -rf "$GOPATH" |
| ... | ... |
@@ -72,9 +72,8 @@ set -e |
| 72 | 72 |
&& ln -snf /usr/src/docker /go/src/github.com/docker/docker |
| 73 | 73 |
EOF |
| 74 | 74 |
|
| 75 |
- # get the RUNC and CONTAINERD commit from the root Dockerfile, this keeps the commits in sync |
|
| 76 |
- awk '$1 == "ENV" && $2 == "RUNC_COMMIT" { print; exit }' Dockerfile >> "$DEST/$version/Dockerfile.build"
|
|
| 77 |
- awk '$1 == "ENV" && $2 == "CONTAINERD_COMMIT" { print; exit }' Dockerfile >> "$DEST/$version/Dockerfile.build"
|
|
| 75 |
+ echo "ENV RUNC_COMMIT $(grep "^RUNC_COMMIT" hack/dockerfile/install-binaries.sh | cut -d"=" -f 2)" >> "$DEST/$version/Dockerfile.build" |
|
| 76 |
+ echo "ENV CONTAINERD_COMMIT $(grep "^CONTAINERD_COMMIT" hack/dockerfile/install-binaries.sh | cut -d"=" -f 2)" >> "$DEST/$version/Dockerfile.build" |
|
| 78 | 77 |
|
| 79 | 78 |
# add runc and containerd compile and install |
| 80 | 79 |
cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
| ... | ... |
@@ -92,9 +92,8 @@ set -e |
| 92 | 92 |
RUN mkdir -p /go/src/github.com/docker && mkdir -p /go/src/github.com/opencontainers |
| 93 | 93 |
EOF |
| 94 | 94 |
|
| 95 |
- # get the RUNC and CONTAINERD commit from the root Dockerfile, this keeps the commits in sync |
|
| 96 |
- awk '$1 == "ENV" && $2 == "RUNC_COMMIT" { print; exit }' Dockerfile >> "$DEST/$version/Dockerfile.build"
|
|
| 97 |
- awk '$1 == "ENV" && $2 == "CONTAINERD_COMMIT" { print; exit }' Dockerfile >> "$DEST/$version/Dockerfile.build"
|
|
| 95 |
+ echo "ENV RUNC_COMMIT $(grep "^RUNC_COMMIT" hack/dockerfile/install-binaries.sh | cut -d"=" -f 2)" >> "$DEST/$version/Dockerfile.build" |
|
| 96 |
+ echo "ENV CONTAINERD_COMMIT $(grep "^CONTAINERD_COMMIT" hack/dockerfile/install-binaries.sh | cut -d"=" -f 2)" >> "$DEST/$version/Dockerfile.build" |
|
| 98 | 97 |
|
| 99 | 98 |
# add runc and containerd compile and install |
| 100 | 99 |
cat >> "$DEST/$version/Dockerfile.build" <<-EOF |