Environment variables should be replaced in URLs in ADD commands. (#580)

We were previously explicitly skipping this for some reason, but Docker
seems to expand these in URLs so we should too.
This commit is contained in:
dlorenc
2019-02-25 10:42:34 -06:00
committed by GitHub
parent 1d079e683e
commit 2abe109eb2
4 changed files with 100 additions and 26 deletions
+4 -1
View File
@@ -24,4 +24,7 @@ COPY $file /arg
# Finally, test adding a remote URL, concurrently with a normal file
ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v1.4.3/docker-credential-gcr_linux_386-1.4.3.tar.gz context/foo /test/all/
ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v1.4.3-static/docker-credential-gcr_linux_amd64-1.4.3.tar.gz /destination
# Test environment replacement in the URL
ENV VERSION=v1.4.3
ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/${VERSION}-static/docker-credential-gcr_linux_amd64-1.4.3.tar.gz /destination