1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Use build args to override binary commits in dockerfile

Signed-off-by: Justen Martin <jmart@the-coder.com>
(cherry picked from commit 095ca77f48)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Justen Martin 2019-09-12 15:22:56 -05:00 committed by Sebastiaan van Stijn
parent 92ca652fc9
commit f3009e2f51
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
9 changed files with 20 additions and 9 deletions

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -1,6 +1,6 @@
#!/bin/sh
GOTESTSUM_COMMIT='v0.3.5'
: ${GOTESTSUM_COMMIT:=v0.3.5}
install_gotestsum() {
echo "Installing gotestsum version $GOTESTSUM_COMMIT"

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -1,6 +1,6 @@
#!/bin/sh
VNDR_COMMIT=f5ab8fc5fb64d66b5c6e55a0bcb58b2e92362fa0
: ${VNDR_COMMIT:=f5ab8fc5fb64d66b5c6e55a0bcb58b2e92362fa0}
install_vndr() {
echo "Install vndr version $VNDR_COMMIT"