Skip to content

Commit

Permalink
Use "ENV key=value" instead of "ENV key value" in Dockerfiles
Browse files Browse the repository at this point in the history
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/
moby/buildkit#4923
  • Loading branch information
luzfcb committed Jul 19, 2024
1 parent e68d935 commit cb103ce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions {{cookiecutter.project_slug}}/compose/local/django/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
6 changes: 3 additions & 3 deletions {{cookiecutter.project_slug}}/compose/local/docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit cb103ce

Please sign in to comment.