-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile.django
35 lines (27 loc) · 1.14 KB
/
Dockerfile.django
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
35
FROM python:3.8-buster
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Update pip setuptools wheel
RUN pip install --upgrade pip setuptools wheel
# Use appropriate Debian buster repositories
RUN echo "deb http://deb.debian.org/debian/ buster main contrib non-free" > /etc/apt/sources.list
RUN echo "deb http://deb.debian.org/debian/ buster-updates main contrib non-free" >> /etc/apt/sources.list
RUN echo "deb http://security.debian.org/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list
# Update the system and install gettext and git
RUN apt-get update && apt-get install -y gettext git
# Install Node.js from NodeSource
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g mapshaper
# Install PostgreSQL client
RUN apt-get install -y libpq-dev gcc
RUN mkdir /src
WORKDIR /src
ADD django/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
ADD django/ /src/
ADD nginx/site/static /usr/share/django/static
ADD django/media /usr/share/django/media
ADD django/translations/ /tmp/translations/
ADD django/locale/ /tmp/locale/