Skip to content

Commit

Permalink
Merge pull request #19780 from spiffxp/kubekins-use-mirror-gcr-io
Browse files Browse the repository at this point in the history
Configure kubekins dockerd to use mirror.gcr.io
  • Loading branch information
k8s-ci-robot authored Oct 30, 2020
2 parents 5dd11dd + 1b8e5ae commit f2c8e70
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions images/kubekins-e2e/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ RUN [ "${UPGRADE_DOCKER_ARG}" = "true" ] && \
rm -rf /var/lib/apt/lists/* && \
sed -i 's/cgroupfs_mount$/#cgroupfs_mount\n/' /etc/init.d/docker || true

# configure dockerd to use mirror.gcr.io
# per instructions at https://cloud.google.com/container-registry/docs/pulling-cached-images
ARG DOCKER_REGISTRY_MIRROR_URL=https://mirror.gcr.io
RUN [ -n "${DOCKER_REGISTRY_MIRROR_URL}" ] && \
echo "DOCKER_OPTS=\"\${DOCKER_OPTS} --registry-mirror=${DOCKER_REGISTRY_MIRROR_URL}\"" | \
tee --append /etc/default/docker

# add env we can debug with the image name:tag
ARG IMAGE_ARG
ENV IMAGE=${IMAGE_ARG}
Expand Down

0 comments on commit f2c8e70

Please sign in to comment.