diff --git a/20.10/dind/Dockerfile b/20.10/dind/Dockerfile index 551ff332e..2edcd8915 100644 --- a/20.10/dind/Dockerfile +++ b/20.10/dind/Dockerfile @@ -6,6 +6,8 @@ FROM docker:20.10 +# git is installed in a separate layer to allow sharing between the "dind" and "git" variants +RUN apk add --no-cache git # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies RUN set -eux; \ apk add --no-cache \ diff --git a/20.10/git/Dockerfile b/20.10/git/Dockerfile index d23654fd2..fd85d6ea4 100644 --- a/20.10/git/Dockerfile +++ b/20.10/git/Dockerfile @@ -6,4 +6,5 @@ FROM docker:20.10 +# git is installed in a separate layer to allow sharing between the "dind" and "git" variants RUN apk add --no-cache git diff --git a/Dockerfile-dind.template b/Dockerfile-dind.template index 6e25a1a9a..5d26361f6 100644 --- a/Dockerfile-dind.template +++ b/Dockerfile-dind.template @@ -1,5 +1,9 @@ FROM docker:{{ env.version }} +{{ if ["19.03", "19.03-rc", "20.10-rc"] | index(env.version) | not then ( -}} +# git is installed in a separate layer to allow sharing between the "dind" and "git" variants +RUN apk add --no-cache git +{{ ) else "" end -}} # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies RUN set -eux; \ apk add --no-cache \ diff --git a/Dockerfile-git.template b/Dockerfile-git.template index 0bf1a1ce4..44b229585 100644 --- a/Dockerfile-git.template +++ b/Dockerfile-git.template @@ -1,3 +1,6 @@ FROM docker:{{ env.version }} +{{ if ["19.03", "19.03-rc", "20.10-rc"] | index(env.version) | not then ( -}} +# git is installed in a separate layer to allow sharing between the "dind" and "git" variants +{{ ) else "" end -}} RUN apk add --no-cache git