From 45f2a0cba7b85883454b5ce50cbf8233e9ad8a80 Mon Sep 17 00:00:00 2001 From: David McKee Date: Wed, 7 Aug 2024 17:47:12 +0100 Subject: [PATCH 1/2] Fix inconsistent capitalisation errors in dockerfiles --- Dockerfile | 6 +++--- compose/local/django/Dockerfile | 6 +++--- compose/local/docs/Dockerfile | 6 +++--- compose/production/django/Dockerfile | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1e8f69783..310ebe544 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,10 @@ ARG PYTHON_VERSION=3.12-slim-bookworm # define an alias for the specfic python version used in this file. -FROM python:${PYTHON_VERSION} as python +FROM python:${PYTHON_VERSION} AS python # Python build stage -FROM python as python-build-stage +FROM python AS python-build-stage ARG BUILD_ENVIRONMENT=production @@ -26,7 +26,7 @@ RUN pip wheel --wheel-dir /usr/src/app/wheels \ # Python 'run' stage -FROM python as python-run-stage +FROM python AS python-run-stage ARG BUILD_ENVIRONMENT=production ARG APP_HOME=/app diff --git a/compose/local/django/Dockerfile b/compose/local/django/Dockerfile index 793c424cc..73cbb2c26 100644 --- a/compose/local/django/Dockerfile +++ b/compose/local/django/Dockerfile @@ -1,10 +1,10 @@ ARG PYTHON_VERSION=3.12-slim-bullseye # define an alias for the specfic python version used in this file. -FROM python:${PYTHON_VERSION} as python +FROM python:${PYTHON_VERSION} AS python # Python build stage -FROM python as python-build-stage +FROM python AS python-build-stage ARG BUILD_ENVIRONMENT=local @@ -24,7 +24,7 @@ RUN pip wheel --wheel-dir /usr/src/app/wheels \ # Python 'run' stage -FROM python as python-run-stage +FROM python AS python-run-stage ARG BUILD_ENVIRONMENT=local ARG APP_HOME=/app diff --git a/compose/local/docs/Dockerfile b/compose/local/docs/Dockerfile index b2dd770d5..53ab67399 100644 --- a/compose/local/docs/Dockerfile +++ b/compose/local/docs/Dockerfile @@ -1,11 +1,11 @@ ARG PYTHON_VERSION=3.12-slim-bullseye # define an alias for the specfic python version used in this file. -FROM python:${PYTHON_VERSION} as python +FROM python:${PYTHON_VERSION} AS python # Python build stage -FROM python as python-build-stage +FROM python AS python-build-stage ENV PYTHONDONTWRITEBYTECODE 1 @@ -28,7 +28,7 @@ RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels \ # Python 'run' stage -FROM python as python-run-stage +FROM python AS python-run-stage ARG BUILD_ENVIRONMENT ENV PYTHONUNBUFFERED 1 diff --git a/compose/production/django/Dockerfile b/compose/production/django/Dockerfile index d6404f1e1..f8dab9e9f 100644 --- a/compose/production/django/Dockerfile +++ b/compose/production/django/Dockerfile @@ -3,10 +3,10 @@ ARG PYTHON_VERSION=3.12-slim-bullseye # define an alias for the specfic python version used in this file. -FROM python:${PYTHON_VERSION} as python +FROM python:${PYTHON_VERSION} AS python # Python build stage -FROM python as python-build-stage +FROM python AS python-build-stage ARG BUILD_ENVIRONMENT=production @@ -26,7 +26,7 @@ RUN pip wheel --wheel-dir /usr/src/app/wheels \ # Python 'run' stage -FROM python as python-run-stage +FROM python AS python-run-stage ARG BUILD_ENVIRONMENT=production ARG APP_HOME=/app From 43e64172d862d46ad1098d09ff90d7b2616fbaa5 Mon Sep 17 00:00:00 2001 From: David McKee Date: Wed, 7 Aug 2024 17:53:17 +0100 Subject: [PATCH 2/2] Version deprecated in docker compose files --- docker-compose.yml | 2 -- production.yml | 2 -- test.yml | 2 -- 3 files changed, 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6569e9cac..7531301b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.1" - services: django: platform: linux/amd64 diff --git a/production.yml b/production.yml index 2cc9f28f3..8919a7b1b 100644 --- a/production.yml +++ b/production.yml @@ -1,5 +1,3 @@ -version: "3" - volumes: production_postgres_data: {} production_postgres_data_backups: {} diff --git a/test.yml b/test.yml index 9a03314d5..08e53fc45 100644 --- a/test.yml +++ b/test.yml @@ -1,5 +1,3 @@ -version: "3" - volumes: ds_caselaw_editor_ui_local_postgres_data: {} ds_caselaw_editor_ui_local_postgres_data_backups: {}