-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (26 loc) · 1.04 KB
/
Dockerfile
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
33
34
# Use an official Python runtime as a parent image
FROM python:3.7
# Install non-python dependencies
RUN apt-get update && apt-get install -y \
gcc \
# uWSGI needs mime-support to serve static files
# with the correct content-type header
mime-support \
binutils libproj-dev gdal-bin libgeoip1 python-gdal \
--no-install-recommends && rm -rf /var/lib/apt/lists/*
# Set the working directory to /app
WORKDIR /app
# Install python packages. Done in a separate step so Docker can cache it.
COPY requirements.txt ./requirements.txt
RUN pip install -r requirements.txt
# Copy a script to run the application.
COPY bin/run.sh /run.sh
CMD ["/run.sh"]
# Copy the current directory contents into the container at /app
COPY . /app
# We need to include static files into a Docker image.
# SECRET_KEY is actually not so important for collectstatic,
# but Django now requires this to run these command.
RUN CFG_SECRET_KEY=fake python manage.py collectstatic --noinput
# Make port 8080 available to the world outside this container
EXPOSE 8080