The directory was solely used by Dockerfile.simple.
For the "simple" mode, we can just directly apt-get the dependencies.
A part of issue 51637
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
| ... | ... |
@@ -321,7 +321,6 @@ FROM tini-${TARGETOS} AS tini
|
| 321 | 321 |
FROM base AS rootlesskit-src |
| 322 | 322 |
WORKDIR /usr/src/rootlesskit |
| 323 | 323 |
RUN git init . && git remote add origin "https://github.com/rootless-containers/rootlesskit.git" |
| 324 |
-# When updating, also update go.mod and hack/dockerfile/install/rootlesskit.installer accordingly. |
|
| 325 | 324 |
ARG ROOTLESSKIT_VERSION=v2.3.5 |
| 326 | 325 |
RUN git fetch -q --depth 1 origin "${ROOTLESSKIT_VERSION}" +refs/tags/*:refs/tags/* && git checkout -q FETCH_HEAD
|
| 327 | 326 |
|
| ... | ... |
@@ -34,12 +34,26 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 34 | 34 |
vim-common \ |
| 35 | 35 |
&& rm -rf /var/lib/apt/lists/* |
| 36 | 36 |
|
| 37 |
-# Install runc, containerd, and tini |
|
| 38 |
-# Please edit hack/dockerfile/install/<name>.installer to update them. |
|
| 39 |
-COPY hack/dockerfile/install hack/dockerfile/install |
|
| 40 |
-RUN set -e; for i in runc containerd tini dockercli; \ |
|
| 41 |
- do hack/dockerfile/install/install.sh $i; \ |
|
| 42 |
- done |
|
| 37 |
+# Install containerd.io (includes runc), tini, and docker-ce-cli. |
|
| 38 |
+# The versions of these dependencies differ from the main Dockerfile, |
|
| 39 |
+# but it should be sufficient for minimal build and test purposes. |
|
| 40 |
+ADD --chmod=0644 --checksum=sha256:1500c1f56fa9e26b9b8f42452a553675796ade0807cdce11975eb98170b3a570 \ |
|
| 41 |
+ https://download.docker.com/linux/debian/gpg /etc/apt/keyrings/docker.asc |
|
| 42 |
+ARG BASE_DEBIAN_DISTRO |
|
| 43 |
+ADD <<-EOT /etc/apt/sources.list.d/docker.sources |
|
| 44 |
+Types: deb |
|
| 45 |
+URIs: https://download.docker.com/linux/debian |
|
| 46 |
+Suites: ${BASE_DEBIAN_DISTRO}
|
|
| 47 |
+Components: stable |
|
| 48 |
+Signed-By: /etc/apt/keyrings/docker.asc |
|
| 49 |
+EOT |
|
| 50 |
+RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
| 51 |
+ containerd.io \ |
|
| 52 |
+ tini \ |
|
| 53 |
+ docker-ce-cli \ |
|
| 54 |
+ && rm -rf /var/lib/apt/lists/* \ |
|
| 55 |
+ && ln -s /usr/bin/tini-static /usr/local/bin/docker-init |
|
| 56 |
+ |
|
| 43 | 57 |
ENV PATH=/usr/local/cli:$PATH |
| 44 | 58 |
|
| 45 | 59 |
ENV AUTO_GOPATH 1 |
| ... | ... |
@@ -175,7 +175,7 @@ ARG CONTAINERD_VERSION=v2.0.7 |
| 175 | 175 |
|
| 176 | 176 |
# Environment variable notes: |
| 177 | 177 |
# - GO_VERSION must be consistent with 'Dockerfile' used by Linux. |
| 178 |
-# - CONTAINERD_VERSION must be consistent with 'hack/dockerfile/install/containerd.installer' used by Linux. |
|
| 178 |
+# - CONTAINERD_VERSION must be consistent with 'Dockerfile' used by Linux. |
|
| 179 | 179 |
# - FROM_DOCKERFILE is used for detection of building within a container. |
| 180 | 180 |
ENV GO_VERSION=${GO_VERSION} `
|
| 181 | 181 |
CONTAINERD_VERSION=${CONTAINERD_VERSION} `
|
| 182 | 182 |
deleted file mode 100755 |
| ... | ... |
@@ -1,36 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# CONTAINERD_VERSION specifies the version of the containerd runtime binary |
|
| 5 |
-# to install from the https://github.com/containerd/containerd repository. |
|
| 6 |
-# |
|
| 7 |
-# This version is used to build statically compiled containerd binaries, and |
|
| 8 |
-# used for the integration tests. The distributed docker .deb and .rpm packages |
|
| 9 |
-# depend on a separate (containerd.io) package, which may be a different version |
|
| 10 |
-# as is specified here. |
|
| 11 |
-# |
|
| 12 |
-# Generally, the commit specified here should match a tagged release. |
|
| 13 |
-: "${CONTAINERD_VERSION:=v2.2.0}"
|
|
| 14 |
- |
|
| 15 |
-install_containerd() ( |
|
| 16 |
- echo "Install containerd version $CONTAINERD_VERSION" |
|
| 17 |
- git clone https://github.com/containerd/containerd.git "$GOPATH/src/github.com/containerd/containerd" |
|
| 18 |
- cd "$GOPATH/src/github.com/containerd/containerd" |
|
| 19 |
- git checkout -q "$CONTAINERD_VERSION" |
|
| 20 |
- |
|
| 21 |
- export BUILDTAGS='netgo osusergo static_build' |
|
| 22 |
- export EXTRA_FLAGS=${GO_BUILDMODE}
|
|
| 23 |
- export EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' |
|
| 24 |
- |
|
| 25 |
- # Reset build flags to nothing if we want a dynbinary |
|
| 26 |
- if [ "$1" = "dynamic" ]; then |
|
| 27 |
- export BUILDTAGS='' |
|
| 28 |
- export EXTRA_FLAGS='' |
|
| 29 |
- export EXTRA_LDFLAGS='' |
|
| 30 |
- fi |
|
| 31 |
- make |
|
| 32 |
- |
|
| 33 |
- install -D bin/containerd "${PREFIX}/containerd"
|
|
| 34 |
- install -D bin/containerd-shim-runc-v2 "${PREFIX}/containerd-shim-runc-v2"
|
|
| 35 |
- install -D bin/ctr "${PREFIX}/ctr"
|
|
| 36 |
-) |
| 37 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,30 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
- |
|
| 3 |
-: ${DOCKERCLI_CHANNEL:=stable}
|
|
| 4 |
-: ${DOCKERCLI_VERSION:=18.06.3-ce}
|
|
| 5 |
- |
|
| 6 |
-install_dockercli() {
|
|
| 7 |
- echo "Install docker/cli version $DOCKERCLI_VERSION from $DOCKERCLI_CHANNEL" |
|
| 8 |
- |
|
| 9 |
- arch=$(uname -m) |
|
| 10 |
- # No official release of these platforms |
|
| 11 |
- if [ "$arch" != "x86_64" ] && [ "$arch" != "s390x" ] && [ "$arch" != "armhf" ]; then |
|
| 12 |
- build_dockercli |
|
| 13 |
- return |
|
| 14 |
- fi |
|
| 15 |
- |
|
| 16 |
- url=https://download.docker.com/linux/static |
|
| 17 |
- curl -Ls "${url}/${DOCKERCLI_CHANNEL}/${arch}/docker-${DOCKERCLI_VERSION}.tgz" | 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 ${GO_BUILDMODE} -o "${PREFIX}/docker" "github.com/docker/cli/cmd/docker"
|
|
| 30 |
-} |
| 31 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,39 +0,0 @@ |
| 1 |
-#!/bin/bash |
|
| 2 |
- |
|
| 3 |
-set -e |
|
| 4 |
-set -x |
|
| 5 |
- |
|
| 6 |
-RM_GOPATH=0 |
|
| 7 |
- |
|
| 8 |
-TMP_GOPATH=${TMP_GOPATH:-""}
|
|
| 9 |
- |
|
| 10 |
-: ${PREFIX:="/usr/local/bin"}
|
|
| 11 |
- |
|
| 12 |
-if [ -z "$TMP_GOPATH" ]; then |
|
| 13 |
- export GOPATH="$(mktemp -d)" |
|
| 14 |
- RM_GOPATH=1 |
|
| 15 |
-else |
|
| 16 |
- export GOPATH="$TMP_GOPATH" |
|
| 17 |
-fi |
|
| 18 |
-case "$(go env GOARCH)" in |
|
| 19 |
- mips* | ppc64) |
|
| 20 |
- # pie build mode is not supported on mips architectures |
|
| 21 |
- export GO_BUILDMODE="" |
|
| 22 |
- ;; |
|
| 23 |
- *) |
|
| 24 |
- export GO_BUILDMODE="-buildmode=pie" |
|
| 25 |
- ;; |
|
| 26 |
-esac |
|
| 27 |
- |
|
| 28 |
-dir="$(dirname $0)" |
|
| 29 |
- |
|
| 30 |
-bin=$1 |
|
| 31 |
-shift |
|
| 32 |
- |
|
| 33 |
-if [ ! -f "${dir}/${bin}.installer" ]; then
|
|
| 34 |
- echo "Could not find installer for \"$bin\"" |
|
| 35 |
- exit 1 |
|
| 36 |
-fi |
|
| 37 |
- |
|
| 38 |
-. ${dir}/${bin}.installer
|
|
| 39 |
-install_${bin} "$@"
|
| 40 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,31 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
- |
|
| 3 |
-# When updating, also update go.mod and Dockerfile accordingly. |
|
| 4 |
-: "${ROOTLESSKIT_VERSION:=v2.3.5}"
|
|
| 5 |
- |
|
| 6 |
-install_rootlesskit() {
|
|
| 7 |
- case "$1" in |
|
| 8 |
- "dynamic") |
|
| 9 |
- install_rootlesskit_dynamic |
|
| 10 |
- return |
|
| 11 |
- ;; |
|
| 12 |
- "") |
|
| 13 |
- export CGO_ENABLED=0 |
|
| 14 |
- _install_rootlesskit |
|
| 15 |
- ;; |
|
| 16 |
- *) |
|
| 17 |
- echo 'Usage: $0 [dynamic]' |
|
| 18 |
- ;; |
|
| 19 |
- esac |
|
| 20 |
-} |
|
| 21 |
- |
|
| 22 |
-install_rootlesskit_dynamic() {
|
|
| 23 |
- export ROOTLESSKIT_LDFLAGS="-linkmode=external" install_rootlesskit |
|
| 24 |
- export BUILD_MODE=${GO_BUILDMODE}
|
|
| 25 |
- _install_rootlesskit |
|
| 26 |
-} |
|
| 27 |
- |
|
| 28 |
-_install_rootlesskit() ( |
|
| 29 |
- echo "Install rootlesskit version ${ROOTLESSKIT_VERSION}"
|
|
| 30 |
- GOBIN="${PREFIX}" go install ${BUILD_MODE} -ldflags="$ROOTLESSKIT_LDFLAGS" "github.com/rootless-containers/rootlesskit/v2/cmd/rootlesskit@${ROOTLESSKIT_VERSION}"
|
|
| 31 |
-) |
| 32 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,27 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# RUNC_VERSION specifies the version of runc to install from the |
|
| 5 |
-# https://github.com/opencontainers/runc repository. |
|
| 6 |
-# |
|
| 7 |
-# The version of runc should match the version that is used by the containerd |
|
| 8 |
-# version that is used. If you need to update runc, open a pull request in |
|
| 9 |
-# the containerd project first, and update both after that is merged. |
|
| 10 |
-: "${RUNC_VERSION:=v1.3.4}"
|
|
| 11 |
- |
|
| 12 |
-install_runc() {
|
|
| 13 |
- RUNC_BUILDTAGS="${RUNC_BUILDTAGS:-"seccomp"}"
|
|
| 14 |
- |
|
| 15 |
- echo "Install runc version $RUNC_VERSION (build tags: $RUNC_BUILDTAGS)" |
|
| 16 |
- git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" |
|
| 17 |
- cd "$GOPATH/src/github.com/opencontainers/runc" |
|
| 18 |
- git checkout -q "$RUNC_VERSION" |
|
| 19 |
- if [ -z "$1" ]; then |
|
| 20 |
- target=static |
|
| 21 |
- else |
|
| 22 |
- target="$1" |
|
| 23 |
- fi |
|
| 24 |
- make BUILDTAGS="$RUNC_BUILDTAGS" "$target" |
|
| 25 |
- mkdir -p "${PREFIX}"
|
|
| 26 |
- cp runc "${PREFIX}/runc"
|
|
| 27 |
-} |
| 28 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,17 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
- |
|
| 3 |
-# TINI_VERSION specifies the version of tini (docker-init) to build, and install |
|
| 4 |
-# from the https://github.com/krallin/tini repository. This binary is used |
|
| 5 |
-# when starting containers with the `--init` option. |
|
| 6 |
-: "${TINI_VERSION:=v0.19.0}"
|
|
| 7 |
- |
|
| 8 |
-install_tini() {
|
|
| 9 |
- echo "Install tini version $TINI_VERSION" |
|
| 10 |
- git clone https://github.com/krallin/tini.git "$GOPATH/tini" |
|
| 11 |
- cd "$GOPATH/tini" |
|
| 12 |
- git checkout -q "$TINI_VERSION" |
|
| 13 |
- cmake . |
|
| 14 |
- make tini-static |
|
| 15 |
- mkdir -p "${PREFIX}"
|
|
| 16 |
- cp tini-static "${PREFIX}/docker-init"
|
|
| 17 |
-} |