diff --git a/Dockerfile b/Dockerfile index f949a7a194..990a7847b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -154,18 +154,21 @@ FROM runtime-dev-cross-${CROSS} AS runtime-dev FROM base AS tomlv ENV INSTALL_BINARY_NAME=tomlv +ARG TOMLV_COMMIT COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME FROM base AS vndr ENV INSTALL_BINARY_NAME=vndr +ARG VNDR_COMMIT COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME FROM dev-base AS containerd ARG DEBIAN_FRONTEND +ARG CONTAINERD_COMMIT RUN apt-get update && apt-get install -y --no-install-recommends \ btrfs-tools \ && rm -rf /var/lib/apt/lists/* @@ -176,6 +179,7 @@ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME FROM dev-base AS proxy ENV INSTALL_BINARY_NAME=proxy +ARG LIBNETWORK_COMMIT COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME @@ -188,24 +192,30 @@ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME FROM base AS gotestsum ENV INSTALL_BINARY_NAME=gotestsum +ARG GOTESTSUM_COMMIT COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME FROM dev-base AS dockercli ENV INSTALL_BINARY_NAME=dockercli +ARG DOCKERCLI_CHANNEL +ARG DOCKERCLI_VERSION COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME FROM runtime-dev AS runc ENV INSTALL_BINARY_NAME=runc +ARG RUNC_COMMIT +ARG RUNC_BUILDTAGS COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME FROM dev-base AS tini ARG DEBIAN_FRONTEND +ARG TINI_COMMIT RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ vim-common \ @@ -217,6 +227,7 @@ RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME FROM dev-base AS rootlesskit ENV INSTALL_BINARY_NAME=rootlesskit +ARG ROOTLESSKIT_COMMIT COPY hack/dockerfile/install/install.sh ./install.sh COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME diff --git a/hack/dockerfile/install/containerd.installer b/hack/dockerfile/install/containerd.installer index f17cad01f4..098f7c8c45 100755 --- a/hack/dockerfile/install/containerd.installer +++ b/hack/dockerfile/install/containerd.installer @@ -4,7 +4,7 @@ # containerd is also pinned in vendor.conf. When updating the binary # version you may also need to update the vendor version to pick up bug # fixes or new APIs. -CONTAINERD_COMMIT=7ad184331fa3e55e52b890ea95e65ba581ae3429 # v1.2.13 +: ${CONTAINERD_COMMIT:=7ad184331fa3e55e52b890ea95e65ba581ae3429} # v1.2.13 install_containerd() { echo "Install containerd version $CONTAINERD_COMMIT" diff --git a/hack/dockerfile/install/dockercli.installer b/hack/dockerfile/install/dockercli.installer index 08c893eba6..f9ba308692 100755 --- a/hack/dockerfile/install/dockercli.installer +++ b/hack/dockerfile/install/dockercli.installer @@ -1,7 +1,7 @@ #!/bin/sh -DOCKERCLI_CHANNEL=${DOCKERCLI_CHANNEL:-stable} -DOCKERCLI_VERSION=${DOCKERCLI_VERSION:-17.06.2-ce} +: ${DOCKERCLI_CHANNEL:=stable} +: ${DOCKERCLI_VERSION:=17.06.2-ce} install_dockercli() { echo "Install docker/cli version $DOCKERCLI_VERSION from $DOCKERCLI_CHANNEL" diff --git a/hack/dockerfile/install/gotestsum.installer b/hack/dockerfile/install/gotestsum.installer index 032f46f2fe..23034fce13 100755 --- a/hack/dockerfile/install/gotestsum.installer +++ b/hack/dockerfile/install/gotestsum.installer @@ -1,6 +1,6 @@ #!/bin/sh -GOTESTSUM_COMMIT='v0.3.5' +: ${GOTESTSUM_COMMIT:=v0.3.5} install_gotestsum() { echo "Installing gotestsum version $GOTESTSUM_COMMIT" diff --git a/hack/dockerfile/install/proxy.installer b/hack/dockerfile/install/proxy.installer index 8ee329ca64..57d9272c2f 100755 --- a/hack/dockerfile/install/proxy.installer +++ b/hack/dockerfile/install/proxy.installer @@ -3,7 +3,7 @@ # LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When # updating the binary version, consider updating github.com/docker/libnetwork # in vendor.conf accordingly -LIBNETWORK_COMMIT=9fd385be8302dbe1071a3ce124891893ff27f90f # bump_19.03 branch +: ${LIBNETWORK_COMMIT:=9fd385be8302dbe1071a3ce124891893ff27f90f} # bump_19.03 branch install_proxy() { case "$1" in diff --git a/hack/dockerfile/install/runc.installer b/hack/dockerfile/install/runc.installer index d4d187da61..e3793ce49f 100755 --- a/hack/dockerfile/install/runc.installer +++ b/hack/dockerfile/install/runc.installer @@ -4,7 +4,7 @@ # The version of runc should match the version that is used by the containerd # version that is used. If you need to update runc, open a pull request in # the containerd project first, and update both after that is merged. -RUNC_COMMIT=dc9208a3303feef5b3839f4323d9beb36df0a9dd # v1.0.0-rc10 +: ${RUNC_COMMIT:=dc9208a3303feef5b3839f4323d9beb36df0a9dd} # v1.0.0-rc10 install_runc() { # If using RHEL7 kernels (3.10.0 el7), disable kmem accounting/limiting diff --git a/hack/dockerfile/install/tini.installer b/hack/dockerfile/install/tini.installer index c622357365..52f4ecc911 100755 --- a/hack/dockerfile/install/tini.installer +++ b/hack/dockerfile/install/tini.installer @@ -1,6 +1,6 @@ #!/bin/sh -TINI_COMMIT=fec3683b971d9c3ef73f284f176672c44b448662 # v0.18.0 +: ${TINI_COMMIT:=fec3683b971d9c3ef73f284f176672c44b448662} # v0.18.0 install_tini() { echo "Install tini version $TINI_COMMIT" diff --git a/hack/dockerfile/install/tomlv.installer b/hack/dockerfile/install/tomlv.installer index cbf23c8e33..43126975a0 100755 --- a/hack/dockerfile/install/tomlv.installer +++ b/hack/dockerfile/install/tomlv.installer @@ -2,7 +2,7 @@ # When updating TOMLV_COMMIT, consider updating github.com/BurntSushi/toml # in vendor.conf accordingly -TOMLV_COMMIT=3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005 # v0.3.1 +: ${TOMLV_COMMIT:=3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005} # v0.3.1 install_tomlv() { echo "Install tomlv version $TOMLV_COMMIT" diff --git a/hack/dockerfile/install/vndr.installer b/hack/dockerfile/install/vndr.installer index 8ded269184..9c89bdd355 100755 --- a/hack/dockerfile/install/vndr.installer +++ b/hack/dockerfile/install/vndr.installer @@ -1,6 +1,6 @@ #!/bin/sh -VNDR_COMMIT=f5ab8fc5fb64d66b5c6e55a0bcb58b2e92362fa0 +: ${VNDR_COMMIT:=f5ab8fc5fb64d66b5c6e55a0bcb58b2e92362fa0} install_vndr() { echo "Install vndr version $VNDR_COMMIT"