From ca5069271c48bc0e75219b79b16387ef82cddf5a Mon Sep 17 00:00:00 2001 From: priyawadhwa Date: Wed, 25 Jul 2018 17:56:17 -0700 Subject: [PATCH] Fully qualify images in dockerfile tests (#257) --- integration/dockerfiles/Dockerfile_onbuild_base | 2 +- integration/dockerfiles/Dockerfile_test_add | 2 +- integration/dockerfiles/Dockerfile_test_copy | 2 +- integration/dockerfiles/Dockerfile_test_copy_bucket | 2 +- integration/dockerfiles/Dockerfile_test_copy_reproducible | 2 +- integration/dockerfiles/Dockerfile_test_env | 2 +- integration/dockerfiles/Dockerfile_test_expose | 2 +- integration/dockerfiles/Dockerfile_test_extract_fs | 2 +- integration/dockerfiles/Dockerfile_test_label | 2 +- integration/dockerfiles/Dockerfile_test_metadata | 2 +- integration/dockerfiles/Dockerfile_test_multistage | 2 +- integration/dockerfiles/Dockerfile_test_mv_add | 2 +- integration/dockerfiles/Dockerfile_test_registry | 2 +- integration/dockerfiles/Dockerfile_test_run | 2 +- integration/dockerfiles/Dockerfile_test_run_2 | 2 +- integration/dockerfiles/Dockerfile_test_user_run | 2 +- integration/dockerfiles/Dockerfile_test_volume | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/integration/dockerfiles/Dockerfile_onbuild_base b/integration/dockerfiles/Dockerfile_onbuild_base index 85532c1a0..93d8e14c0 100644 --- a/integration/dockerfiles/Dockerfile_onbuild_base +++ b/integration/dockerfiles/Dockerfile_onbuild_base @@ -1,4 +1,4 @@ -FROM gcr.io/google-appengine/debian9:latest +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 ENV dir /tmp/dir/ ONBUILD RUN echo "onbuild" > /tmp/onbuild ONBUILD RUN mkdir $dir diff --git a/integration/dockerfiles/Dockerfile_test_add b/integration/dockerfiles/Dockerfile_test_add index 4b58ee6fa..a2d119991 100644 --- a/integration/dockerfiles/Dockerfile_test_add +++ b/integration/dockerfiles/Dockerfile_test_add @@ -1,4 +1,4 @@ -FROM gcr.io/google-appengine/debian9:latest +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 # First, try adding some regular files ADD context/foo foo ADD context/foo /foodir/ diff --git a/integration/dockerfiles/Dockerfile_test_copy b/integration/dockerfiles/Dockerfile_test_copy index fd184394d..94d8de634 100644 --- a/integration/dockerfiles/Dockerfile_test_copy +++ b/integration/dockerfiles/Dockerfile_test_copy @@ -1,4 +1,4 @@ -FROM alpine:3.7 +FROM alpine@sha256:5ce5f501c457015c4b91f91a15ac69157d9b06f1a75cf9107bf2b62e0843983a COPY context/foo foo COPY context/foo /foodir/ COPY context/bar/b* bar/ diff --git a/integration/dockerfiles/Dockerfile_test_copy_bucket b/integration/dockerfiles/Dockerfile_test_copy_bucket index fd184394d..94d8de634 100644 --- a/integration/dockerfiles/Dockerfile_test_copy_bucket +++ b/integration/dockerfiles/Dockerfile_test_copy_bucket @@ -1,4 +1,4 @@ -FROM alpine:3.7 +FROM alpine@sha256:5ce5f501c457015c4b91f91a15ac69157d9b06f1a75cf9107bf2b62e0843983a COPY context/foo foo COPY context/foo /foodir/ COPY context/bar/b* bar/ diff --git a/integration/dockerfiles/Dockerfile_test_copy_reproducible b/integration/dockerfiles/Dockerfile_test_copy_reproducible index fd184394d..94d8de634 100644 --- a/integration/dockerfiles/Dockerfile_test_copy_reproducible +++ b/integration/dockerfiles/Dockerfile_test_copy_reproducible @@ -1,4 +1,4 @@ -FROM alpine:3.7 +FROM alpine@sha256:5ce5f501c457015c4b91f91a15ac69157d9b06f1a75cf9107bf2b62e0843983a COPY context/foo foo COPY context/foo /foodir/ COPY context/bar/b* bar/ diff --git a/integration/dockerfiles/Dockerfile_test_env b/integration/dockerfiles/Dockerfile_test_env index ce37081cb..b0f68c297 100644 --- a/integration/dockerfiles/Dockerfile_test_env +++ b/integration/dockerfiles/Dockerfile_test_env @@ -1,4 +1,4 @@ -FROM gcr.io/google-appengine/debian9 +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 ENV hey hey ENV PATH /usr/local ENV hey hello diff --git a/integration/dockerfiles/Dockerfile_test_expose b/integration/dockerfiles/Dockerfile_test_expose index aad7c9fea..7df9f6336 100644 --- a/integration/dockerfiles/Dockerfile_test_expose +++ b/integration/dockerfiles/Dockerfile_test_expose @@ -1,4 +1,4 @@ -FROM gcr.io/google-appengine/debian9 +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 EXPOSE 80 EXPOSE 81/udp ENV protocol tcp diff --git a/integration/dockerfiles/Dockerfile_test_extract_fs b/integration/dockerfiles/Dockerfile_test_extract_fs index bb53ee2a4..64cf5576a 100644 --- a/integration/dockerfiles/Dockerfile_test_extract_fs +++ b/integration/dockerfiles/Dockerfile_test_extract_fs @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM gcr.io/google-appengine/debian9:latest +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 diff --git a/integration/dockerfiles/Dockerfile_test_label b/integration/dockerfiles/Dockerfile_test_label index a52222599..8c825dbcb 100644 --- a/integration/dockerfiles/Dockerfile_test_label +++ b/integration/dockerfiles/Dockerfile_test_label @@ -1,4 +1,4 @@ -FROM gcr.io/google-appengine/debian9 +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 LABEL foo=bar LABEL "baz"="bat" ENV label1 "mylabel" diff --git a/integration/dockerfiles/Dockerfile_test_metadata b/integration/dockerfiles/Dockerfile_test_metadata index 261db4d5b..00c325f2c 100644 --- a/integration/dockerfiles/Dockerfile_test_metadata +++ b/integration/dockerfiles/Dockerfile_test_metadata @@ -1,4 +1,4 @@ -FROM gcr.io/distroless/base:latest +FROM gcr.io/distroless/base@sha256:628939ac8bf3f49571d05c6c76b8688cb4a851af6c7088e599388259875bde20 CMD ["command", "one"] CMD ["command", "two"] CMD echo "hello" diff --git a/integration/dockerfiles/Dockerfile_test_multistage b/integration/dockerfiles/Dockerfile_test_multistage index a4d2dd506..e44612e63 100644 --- a/integration/dockerfiles/Dockerfile_test_multistage +++ b/integration/dockerfiles/Dockerfile_test_multistage @@ -1,4 +1,4 @@ -FROM gcr.io/distroless/base:latest as base +FROM gcr.io/distroless/base@sha256:628939ac8bf3f49571d05c6c76b8688cb4a851af6c7088e599388259875bde20 as base COPY . . FROM scratch as second diff --git a/integration/dockerfiles/Dockerfile_test_mv_add b/integration/dockerfiles/Dockerfile_test_mv_add index 60200df9c..2f156edca 100644 --- a/integration/dockerfiles/Dockerfile_test_mv_add +++ b/integration/dockerfiles/Dockerfile_test_mv_add @@ -1,3 +1,3 @@ -FROM busybox +FROM busybox@sha256:1bd6df27274fef1dd36eb529d0f4c8033f61c675d6b04213dd913f902f7cafb5 ADD context/tars /tmp/tars RUN mv /tmp/tars /foo diff --git a/integration/dockerfiles/Dockerfile_test_registry b/integration/dockerfiles/Dockerfile_test_registry index 67feb704a..ce6cab44e 100644 --- a/integration/dockerfiles/Dockerfile_test_registry +++ b/integration/dockerfiles/Dockerfile_test_registry @@ -1,2 +1,2 @@ -FROM busybox +FROM busybox@sha256:1bd6df27274fef1dd36eb529d0f4c8033f61c675d6b04213dd913f902f7cafb5 RUN echo "hey" > /hey diff --git a/integration/dockerfiles/Dockerfile_test_run b/integration/dockerfiles/Dockerfile_test_run index ee5640f8b..f687c2ea8 100644 --- a/integration/dockerfiles/Dockerfile_test_run +++ b/integration/dockerfiles/Dockerfile_test_run @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM gcr.io/google-appengine/debian9 +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 RUN echo "hey" > /etc/foo RUN echo "baz" > /etc/baz RUN cp /etc/baz /etc/bar diff --git a/integration/dockerfiles/Dockerfile_test_run_2 b/integration/dockerfiles/Dockerfile_test_run_2 index af279464a..8e685de6b 100644 --- a/integration/dockerfiles/Dockerfile_test_run_2 +++ b/integration/dockerfiles/Dockerfile_test_run_2 @@ -15,6 +15,6 @@ # Test to make sure the executor builds an image correctly # when no files are changed -FROM gcr.io/google-appengine/debian9 +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 RUN echo "hey" MAINTAINER kaniko diff --git a/integration/dockerfiles/Dockerfile_test_user_run b/integration/dockerfiles/Dockerfile_test_user_run index 511043c5a..b9a3c2be4 100644 --- a/integration/dockerfiles/Dockerfile_test_user_run +++ b/integration/dockerfiles/Dockerfile_test_user_run @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM gcr.io/google-appengine/debian9 +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 RUN useradd testuser RUN groupadd testgroup USER testuser:testgroup diff --git a/integration/dockerfiles/Dockerfile_test_volume b/integration/dockerfiles/Dockerfile_test_volume index f5a255cfe..1ffb7a514 100644 --- a/integration/dockerfiles/Dockerfile_test_volume +++ b/integration/dockerfiles/Dockerfile_test_volume @@ -1,4 +1,4 @@ -FROM gcr.io/google-appengine/debian9 +FROM gcr.io/google-appengine/debian9@sha256:1d6a9a6d106bd795098f60f4abb7083626354fa6735e81743c7f8cfca11259f0 RUN mkdir /foo RUN echo "hello" > /foo/hey VOLUME /foo/bar /tmp