forked from Silvian/bookworm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (25 loc) · 969 Bytes
/
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
FROM python:3.6
# Install required packages.
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
wget \
gettext \
libxmlsec1-dev \
&& rm -rf /var/lib/apt/lists/*
# Download and install dockerize.
# Needed so the web container will wait for PostgreSQL to start.
ENV DOCKERIZE_VERSION v0.4.0
RUN wget --no-verbose https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
# Set PYTHONUNBUFFERED so output is displayed in the Docker log
ENV PYTHONUNBUFFERED=1
ENV STATIC_ROOT=/usr/src/app/static/
EXPOSE 8000
WORKDIR /usr/src/app
# Install dependencies
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Copy the rest of the application's code
COPY . /usr/src/app
# Run the app
CMD ["./scripts/run.sh"]