forked from elpaso/qgis-feed
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
45 lines (34 loc) · 1.79 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
35
36
37
38
39
40
41
42
43
44
45
# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.8-slim
EXPOSE 8000
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
RUN apt-get update
RUN echo "Installing GDAL dependencies" && \
apt-get install -y libgdal-dev libcurl4-gnutls-dev librtmp-dev && \
echo "Installing other depdencies" && \
apt-get install -y wait-for-it curl sudo && \
echo "Install C library for geoip2" && \
apt-get install -y libmaxminddb0 libmaxminddb-dev mmdb-bin && \
echo "Removing build dependencies and cleaning up" && \
rm -rf /var/lib/apt/lists/* && \
rm -rf ~/.cache/pip
# Install pip requirements
ADD REQUIREMENTS.txt .
RUN python -m pip install -r REQUIREMENTS.txt
RUN apt-get update && apt-get install -y curl && curl -LJO https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb && \
mkdir /var/opt/maxmind && \
mv GeoLite2-City.mmdb /var/opt/maxmind/GeoLite2-City.mmdb
# Install NodeJS and bulma css webpack
RUN apt-get -qq update && apt-get -qq install -y --no-install-recommends wget && \
wget --no-check-certificate https://deb.nodesource.com/setup_18.x -O /tmp/node.sh && bash /tmp/node.sh && \
apt-get -qq update && apt-get -qq install -y nodejs build-essential
WORKDIR /code
COPY . /code
RUN npm install -g [email protected] && npm install -g [email protected] && npm install -g [email protected] && npm install
ENV GEOIP_PATH=/var/opt/maxmind/
# Creates a non-root user
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "qgisfeedproject.wsgi"]