django-template/Dockerfiles/django/Dockerfile
jnfire edef594e59 fix test and dockerfile of django
fix test and dockerfile of django
2022-08-01 16:58:51 +02:00

29 lines
752 B
Docker

FROM python:3.10-slim
# Prevents Python from writing pyc files to disc (equivalent to python -B option)
ENV PYTHONDONTWRITEBYTECODE 1
# Prevents Python from buffering stdout and stderr (equivalent to python -u option)
ENV PYTHONUNBUFFERED 1
# set work directory
WORKDIR /usr/src/app
# set time
RUN ln -fs /usr/share/zoneinfo/Europe/Madrid /etc/localtime
RUN dpkg-reconfigure -f noninteractive tzdata
# install software
RUN apt update
RUN apt install -y build-essential python3-dev libpq-dev python3-pip gettext
# install dependencies
RUN pip3 install --upgrade pip
# install basic dependencies
COPY ./requirements.txt .
RUN pip3 install -r requirements.txt
# launcher
COPY django-launcher.sh /django-launcher.sh
RUN chmod +x /django-launcher.sh