From c7eded8644bc565eaf86401037a77f9969c15b9a Mon Sep 17 00:00:00 2001 From: Tim Freund Date: Thu, 25 Jan 2024 04:12:07 -0500 Subject: [PATCH] Add registry to Docker images names (#4804) Prepending docker.io/ to image names allows projects to be run in alternate runtimes such as podman-compose without additional configuration. --- .../compose/local/django/Dockerfile | 6 +++--- .../compose/local/docs/Dockerfile | 6 +++--- .../compose/local/node/Dockerfile | 2 +- .../compose/production/aws/Dockerfile | 2 +- .../compose/production/django/Dockerfile | 8 ++++---- .../compose/production/nginx/Dockerfile | 2 +- .../compose/production/postgres/Dockerfile | 2 +- .../compose/production/traefik/Dockerfile | 2 +- {{cookiecutter.project_slug}}/local.yml | 4 ++-- {{cookiecutter.project_slug}}/production.yml | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index 703474a6..575a4518 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,8 +1,8 @@ # define an alias for the specific python version used in this file. -FROM python:3.11.7-slim-bookworm as python +FROM docker.io/python:3.11.7-slim-bookworm as python # Python build stage -FROM python as python-build-stage +FROM docker.io/python as python-build-stage ARG BUILD_ENVIRONMENT=local @@ -22,7 +22,7 @@ RUN pip wheel --wheel-dir /usr/src/app/wheels \ # Python 'run' stage -FROM python as python-run-stage +FROM docker.io/python as python-run-stage ARG BUILD_ENVIRONMENT=local ARG APP_HOME=/app diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile index 41ab15b9..2b68c84b 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile @@ -1,9 +1,9 @@ # define an alias for the specific python version used in this file. -FROM python:3.11.7-slim-bookworm as python +FROM docker.io/python:3.11.7-slim-bookworm as python # Python build stage -FROM python as python-build-stage +FROM docker.io/python as python-build-stage ENV PYTHONDONTWRITEBYTECODE 1 @@ -26,7 +26,7 @@ RUN pip wheel --no-cache-dir --wheel-dir /usr/src/app/wheels \ # Python 'run' stage -FROM python as python-run-stage +FROM docker.io/python as python-run-stage ARG BUILD_ENVIRONMENT ENV PYTHONUNBUFFERED 1 diff --git a/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile index 41f42b62..0848ecaf 100644 --- a/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-bookworm-slim +FROM docker.io/node:20-bookworm-slim WORKDIR /app diff --git a/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile index 4d1ecbb2..36eea7f8 100644 --- a/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/aws/Dockerfile @@ -1,4 +1,4 @@ -FROM garland/aws-cli-docker:1.16.140 +FROM docker.io/garland/aws-cli-docker:1.16.140 COPY ./compose/production/aws/maintenance /usr/local/bin/maintenance COPY ./compose/production/postgres/maintenance/_sourced /usr/local/bin/maintenance/_sourced diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index e0da6063..079f6bd7 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -1,5 +1,5 @@ {% if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] -%} -FROM node:20-bookworm-slim as client-builder +FROM docker.io/node:20-bookworm-slim as client-builder ARG APP_HOME=/app WORKDIR ${APP_HOME} @@ -25,10 +25,10 @@ RUN npm run build {%- endif %} # define an alias for the specific python version used in this file. -FROM python:3.11.7-slim-bookworm as python +FROM docker.io/python:3.11.7-slim-bookworm as python # Python build stage -FROM python as python-build-stage +FROM docker.io/python as python-build-stage ARG BUILD_ENVIRONMENT=production @@ -48,7 +48,7 @@ RUN pip wheel --wheel-dir /usr/src/app/wheels \ # Python 'run' stage -FROM python as python-run-stage +FROM docker.io/python as python-run-stage ARG BUILD_ENVIRONMENT=production ARG APP_HOME=/app diff --git a/{{cookiecutter.project_slug}}/compose/production/nginx/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/nginx/Dockerfile index 911b16f7..ec2ad35c 100644 --- a/{{cookiecutter.project_slug}}/compose/production/nginx/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/nginx/Dockerfile @@ -1,2 +1,2 @@ -FROM nginx:1.17.8-alpine +FROM docker.io/nginx:1.17.8-alpine COPY ./compose/production/nginx/default.conf /etc/nginx/conf.d/default.conf diff --git a/{{cookiecutter.project_slug}}/compose/production/postgres/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/postgres/Dockerfile index eca29bad..5da8982f 100644 --- a/{{cookiecutter.project_slug}}/compose/production/postgres/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/postgres/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:{{ cookiecutter.postgresql_version }} +FROM docker.io/postgres:{{ cookiecutter.postgresql_version }} COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance RUN chmod +x /usr/local/bin/maintenance/* diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile index 321551ea..c32b1587 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:2.10.7 +FROM docker.io/traefik:2.10.7 RUN mkdir -p /etc/traefik/acme \ && touch /etc/traefik/acme/acme.json \ && chmod 600 /etc/traefik/acme/acme.json diff --git a/{{cookiecutter.project_slug}}/local.yml b/{{cookiecutter.project_slug}}/local.yml index 6609f805..d924b739 100644 --- a/{{cookiecutter.project_slug}}/local.yml +++ b/{{cookiecutter.project_slug}}/local.yml @@ -58,7 +58,7 @@ services: {%- if cookiecutter.use_mailpit == 'y' %} mailpit: - image: axllent/mailpit:latest + image: docker.io/axllent/mailpit:latest container_name: {{ cookiecutter.project_slug }}_local_mailpit ports: - "8025:8025" @@ -67,7 +67,7 @@ services: {%- if cookiecutter.use_celery == 'y' %} redis: - image: redis:6 + image: docker.io/redis:6 container_name: {{ cookiecutter.project_slug }}_local_redis celeryworker: diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 30d72d61..f7bf5284 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -67,7 +67,7 @@ services: {%- endif %} redis: - image: redis:6 + image: docker.io/redis:6 {%- if cookiecutter.use_celery == 'y' %} celeryworker: