From cb103ce28d684b81d5efbf0b36d9b526c137b001 Mon Sep 17 00:00:00 2001 From: "Fabio C. Barrionuevo da Luz" Date: Thu, 18 Jul 2024 17:07:44 -0300 Subject: [PATCH] Use "ENV key=value" instead of "ENV key value" in Dockerfiles The old syntax for ENV and LABEL is marked as deprecated in docker buildx v0.14.0 https://docs.docker.com/reference/build-checks/legacy-key-value-format/ https://github.com/moby/buildkit/pull/4923 --- .../compose/local/django/Dockerfile | 6 +++--- {{cookiecutter.project_slug}}/compose/local/docs/Dockerfile | 6 +++--- {{cookiecutter.project_slug}}/compose/local/node/Dockerfile | 2 +- .../compose/production/django/Dockerfile | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index 26a21c93..1183ae98 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -27,9 +27,9 @@ FROM python AS python-run-stage ARG BUILD_ENVIRONMENT=local ARG APP_HOME=/app -ENV PYTHONUNBUFFERED 1 -ENV PYTHONDONTWRITEBYTECODE 1 -ENV BUILD_ENV ${BUILD_ENVIRONMENT} +ENV PYTHONUNBUFFERED=1 +ENV PYTHONDONTWRITEBYTECODE=1 +ENV BUILD_ENV=${BUILD_ENVIRONMENT} WORKDIR ${APP_HOME} diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile index 54e20988..cdc002fe 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile @@ -5,7 +5,7 @@ FROM docker.io/python:3.12.4-slim-bookworm AS python # Python build stage FROM python AS python-build-stage -ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONDONTWRITEBYTECODE=1 RUN apt-get update && apt-get install --no-install-recommends -y \ # dependencies for building Python packages @@ -29,8 +29,8 @@ RUN pip wheel --no-cache-dir --wheel-dir /usr/src/app/wheels \ FROM python AS python-run-stage ARG BUILD_ENVIRONMENT -ENV PYTHONUNBUFFERED 1 -ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED=1 +ENV PYTHONDONTWRITEBYTECODE=1 RUN apt-get update && apt-get install --no-install-recommends -y \ # To run the Makefile diff --git a/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile index 0848ecaf..438e3fa0 100644 --- a/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/node/Dockerfile @@ -6,4 +6,4 @@ COPY ./package.json /app RUN npm install && npm cache clean --force -ENV PATH ./node_modules/.bin/:$PATH +ENV PATH=./node_modules/.bin/:$PATH diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index ee3b9994..6279908a 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -53,9 +53,9 @@ FROM python AS python-run-stage ARG BUILD_ENVIRONMENT=production ARG APP_HOME=/app -ENV PYTHONUNBUFFERED 1 -ENV PYTHONDONTWRITEBYTECODE 1 -ENV BUILD_ENV ${BUILD_ENVIRONMENT} +ENV PYTHONUNBUFFERED=1 +ENV PYTHONDONTWRITEBYTECODE=1 +ENV BUILD_ENV=${BUILD_ENVIRONMENT} WORKDIR ${APP_HOME}