Skip to content

Commit

Permalink
fix: use new ENV key=value format in Dockerfile (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsorber authored Jan 27, 2025
1 parent daced7f commit c655d6f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions {{ cookiecutter.__project_name_kebab_case }}/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN rm /etc/apt/apt.conf.d/docker-clean
# Configure Python to print tracebacks on crash [1], and to not buffer stdout and stderr [2].
# [1] https://docs.python.org/3/using/cmdline.html#envvar-PYTHONFAULTHANDLER
# [2] https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED
ENV PYTHONFAULTHANDLER 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONFAULTHANDLER=1
ENV PYTHONUNBUFFERED=1
{%- endif %}

# Create a non-root user and switch to it [1].
Expand All @@ -23,8 +23,8 @@ RUN groupadd --gid $GID user && \
USER user

# Create and activate a virtual environment.
ENV VIRTUAL_ENV /opt/{{ cookiecutter.__project_name_kebab_case }}-env
ENV PATH $VIRTUAL_ENV/bin:$PATH
ENV VIRTUAL_ENV=/opt/{{ cookiecutter.__project_name_kebab_case }}-env
ENV PATH=$VIRTUAL_ENV/bin:$PATH
RUN python -m venv $VIRTUAL_ENV

# Set the working directory.
Expand All @@ -37,8 +37,8 @@ FROM base AS poetry
USER root

# Install Poetry in separate venv so it doesn't pollute the main venv.
ENV POETRY_VERSION 2.0.1
ENV POETRY_VIRTUAL_ENV /opt/poetry-env
ENV POETRY_VERSION=2.0.1
ENV POETRY_VIRTUAL_ENV=/opt/poetry-env
RUN --mount=type=cache,target=/root/.cache/pip/ \
python -m venv $POETRY_VIRTUAL_ENV && \
$POETRY_VIRTUAL_ENV/bin/pip install poetry~=$POETRY_VERSION && \
Expand Down Expand Up @@ -93,7 +93,7 @@ RUN mkdir -p /opt/build/poetry/ && cp poetry.lock /opt/build/poetry/ && \
mkdir -p /opt/build/git/ && cp .git/hooks/commit-msg .git/hooks/pre-commit /opt/build/git/

# Configure the non-root user's shell.
ENV ANTIDOTE_VERSION 1.9.7
ENV ANTIDOTE_VERSION=1.9.7
RUN git clone --branch v$ANTIDOTE_VERSION --depth=1 https://github.com/mattmc3/antidote.git ~/.antidote/ && \
echo 'zsh-users/zsh-syntax-highlighting' >> ~/.zsh_plugins.txt && \
echo 'zsh-users/zsh-autosuggestions' >> ~/.zsh_plugins.txt && \
Expand Down

0 comments on commit c655d6f

Please sign in to comment.