-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-django
More file actions
32 lines (22 loc) · 918 Bytes
/
Dockerfile-django
File metadata and controls
32 lines (22 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Development Dockerfile for Django app
FROM python:3.8-slim
ENV PYTHONUNBUFFERED 0
# Expose our application port
EXPOSE 80
# Copy wait-for-it.sh script
COPY ./wait-for-it.sh /usr/bin/
# Install bash, libpq and gettext
# Bash is required to support `wait-for-it.sh` script, should not add too much to docker image
RUN apt-get -y update && apt-get -y install bash gettext libpq-dev python-dev
# Copy Python requirements dir and Install requirements
RUN pip install -U pipenv>=2020.6.2 pip setuptools wheel
COPY Pipfile /
COPY Pipfile.lock /
# Install all dependencies from Pipfile.lock file
RUN pipenv install --system --ignore-pipfile --dev
# Check for security warnings, will be enabled later when failing dependencies have been updated
# RUN pipenv check --system
# Set the default directory where CMD will execute
WORKDIR /app
# Run Django's runserver by default
CMD python manage.py runserver 0.0.0.0:80