Skip to content

Commit

Permalink
feat: add make to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsna committed Jan 24, 2024
1 parent 0cd76c2 commit e6a2acf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Build arguments
ARG PYTHON_VERSION=3.11-slim

FROM python:${PYTHON_VERSION}
Expand All @@ -10,20 +9,21 @@ ENV PATH /env/bin:$PATH
# Install pip requirements
WORKDIR /app
COPY . .
RUN /env/bin/pip install --no-cache-dir . && \
rm nginx.conf
RUN /env/bin/pip install --no-cache-dir . && rm nginx.conf

# Install nginx and copy configuration
RUN apt-get update && apt-get install -y --no-install-recommends nginx curl \
# Install make, nginx and copy configuration
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl make nginx \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm /etc/nginx/sites-enabled/default
COPY nginx.conf /etc/nginx/nginx.conf
# https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDONTWRITEBYTECODE

# Prevents Python from writing .pyc files to disc
# https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDONTWRITEBYTECODE
ENV PYTHONDONTWRITEBYTECODE 1

# ensures that the python output is sent straight to terminal (e.g. your container log)
# Ensures that the python output is sent straight to terminal (e.g. your container log)
# without being first buffered and that you can see the output of your application (e.g. django logs)
# in real time. Equivalent to python -u: https://docs.python.org/3/using/cmdline.html#cmdoption-u
ENV PYTHONUNBUFFERED 1
Expand Down

0 comments on commit e6a2acf

Please sign in to comment.