From 5de73f6c3602fa449517a1d5f32400015f7c6724 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 23 Oct 2019 17:22:35 +0900 Subject: [PATCH] Use explicit image paths To make it clear that docker hub is but one of many possible registries, update our usage of FROM and image: lines to include docker.io in the path. There are a few other FROM lines for the gitea images which are handled in a separate stack. Change-Id: I6fafd5f659ad19de6951574afc9a6b6a4cf184df --- docker/gerrit/2.13/Dockerfile | 2 +- docker/gerrit/base/Dockerfile | 4 ++-- docker/gerrit/bazel/Dockerfile | 4 ++-- docker/python-base/Dockerfile | 2 +- docker/python-builder/Dockerfile | 5 ++--- playbooks/roles/gitea/templates/docker-compose.yaml.j2 | 6 +++--- playbooks/roles/haproxy/files/docker/docker-compose.yaml | 4 ++-- .../registry/files/registry-docker/docker-compose.yaml | 2 +- .../files/zuul-preview-docker/docker-compose.yaml | 2 +- 9 files changed, 15 insertions(+), 16 deletions(-) diff --git a/docker/gerrit/2.13/Dockerfile b/docker/gerrit/2.13/Dockerfile index 0f1f595b0b..ba27b15330 100644 --- a/docker/gerrit/2.13/Dockerfile +++ b/docker/gerrit/2.13/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM openjdk:8 +FROM docker.io/library/openjdk:8 # It's not 100% clear that unzip and libmysql-java are needed RUN apt-get update \ diff --git a/docker/gerrit/base/Dockerfile b/docker/gerrit/base/Dockerfile index 5e5ef44918..cfbc53963e 100644 --- a/docker/gerrit/base/Dockerfile +++ b/docker/gerrit/base/Dockerfile @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM opendevorg/python-builder as builder +FROM docker.io/opendevorg/python-builder as builder COPY . /tmp/src RUN assemble -FROM openjdk:8 +FROM docker.io/library/openjdk:8 RUN apt-get update \ && apt-get install -y dumb-init python3-launchpadlib \ diff --git a/docker/gerrit/bazel/Dockerfile b/docker/gerrit/bazel/Dockerfile index f0335f48ad..c0f7b51f99 100644 --- a/docker/gerrit/bazel/Dockerfile +++ b/docker/gerrit/bazel/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM opendevorg/bazel as builder +FROM docker.io/opendevorg/bazel as builder USER builder COPY . /usr/src @@ -21,6 +21,6 @@ COPY . /usr/src ARG BAZEL_OPTS RUN cd /usr/src && bash build-gerrit.sh -FROM opendevorg/gerrit-base +FROM docker.io/opendevorg/gerrit-base COPY --from=builder /usr/src/bazel-bin/release.war /var/gerrit/bin/gerrit.war diff --git a/docker/python-base/Dockerfile b/docker/python-base/Dockerfile index 5b1b446562..762407dddb 100644 --- a/docker/python-base/Dockerfile +++ b/docker/python-base/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM python:3.7-slim +FROM docker.io/library/python:3.7-slim RUN apt-get update \ && apt-get install -y dumb-init libjemalloc2 \ diff --git a/docker/python-builder/Dockerfile b/docker/python-builder/Dockerfile index a1103fb6ae..3e8efbc517 100644 --- a/docker/python-builder/Dockerfile +++ b/docker/python-builder/Dockerfile @@ -13,8 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - -FROM python:3.7-slim as fake-python +FROM docker.io/library/python:3.7-slim as fake-python WORKDIR /tmp RUN apt-get update \ @@ -23,7 +22,7 @@ RUN apt-get update \ COPY python3-dev.control /tmp/python3-dev.control RUN equivs-build /tmp/python3-dev.control -FROM python:3.7-slim +FROM docker.io/library/python:3.7-slim COPY --from=fake-python /tmp/python3-dev_4.0.0_all.deb /tmp/python3-dev_4.0.0_all.deb COPY scripts/assemble /usr/local/bin/assemble diff --git a/playbooks/roles/gitea/templates/docker-compose.yaml.j2 b/playbooks/roles/gitea/templates/docker-compose.yaml.j2 index 2e9cd8802f..0ae57b8276 100644 --- a/playbooks/roles/gitea/templates/docker-compose.yaml.j2 +++ b/playbooks/roles/gitea/templates/docker-compose.yaml.j2 @@ -4,7 +4,7 @@ version: '2' services: mariadb: - image: mariadb:10.4 + image: docker.io/library/mariadb:10.4 network_mode: host restart: always environment: @@ -17,7 +17,7 @@ services: gitea-web: depends_on: - mariadb - image: opendevorg/gitea:latest + image: docker.io/opendevorg/gitea:latest network_mode: host restart: always environment: @@ -37,7 +37,7 @@ services: - mariadb environment: - SSH_LISTEN_PORT=222 - image: opendevorg/gitea-openssh + image: docker.io/opendevorg/gitea-openssh network_mode: host restart: always volumes: diff --git a/playbooks/roles/haproxy/files/docker/docker-compose.yaml b/playbooks/roles/haproxy/files/docker/docker-compose.yaml index dffb142b49..bd20660780 100644 --- a/playbooks/roles/haproxy/files/docker/docker-compose.yaml +++ b/playbooks/roles/haproxy/files/docker/docker-compose.yaml @@ -5,7 +5,7 @@ version: '2' services: haproxy: restart: always - image: haproxy:latest + image: docker.io/library/haproxy:latest network_mode: host volumes: - /dev/log:/dev/log @@ -13,7 +13,7 @@ services: - /var/haproxy/run:/var/haproxy/run haproxy-statsd: restart: always - image: opendevorg/haproxy-statsd:latest + image: docker.io/opendevorg/haproxy-statsd:latest network_mode: host volumes: - /var/haproxy/run:/var/haproxy/run diff --git a/playbooks/roles/registry/files/registry-docker/docker-compose.yaml b/playbooks/roles/registry/files/registry-docker/docker-compose.yaml index 4d803ee061..0204c59eb1 100644 --- a/playbooks/roles/registry/files/registry-docker/docker-compose.yaml +++ b/playbooks/roles/registry/files/registry-docker/docker-compose.yaml @@ -5,7 +5,7 @@ version: '2' services: registry: restart: always - image: zuul/zuul-registry + image: docker.io/zuul/zuul-registry network_mode: host volumes: - /var/registry/certs:/certs diff --git a/playbooks/roles/zuul-preview/files/zuul-preview-docker/docker-compose.yaml b/playbooks/roles/zuul-preview/files/zuul-preview-docker/docker-compose.yaml index 3cc4cc2e8a..651d04259c 100644 --- a/playbooks/roles/zuul-preview/files/zuul-preview-docker/docker-compose.yaml +++ b/playbooks/roles/zuul-preview/files/zuul-preview-docker/docker-compose.yaml @@ -5,7 +5,7 @@ version: '2' services: zuul-preview: restart: always - image: zuul/zuul-preview:latest + image: docker.io/zuul/zuul-preview:latest network_mode: host environment: ZUUL_API_URL: https://zuul.opendev.org/