-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
45 lines (34 loc) · 1.66 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
FROM python:3.6.6-stretch
WORKDIR /var/app
RUN apt-get update -y
RUN apt-get -y install binutils libproj-dev gdal-bin
# Requirements txt
COPY requirements.txt /tmp/
RUN pip install --requirement /tmp/requirements.txt
RUN useradd uwsgi -s /bin/false
RUN mkdir /var/log/uwsgi
RUN chown -R uwsgi:uwsgi /var/log/uwsgi
# Install Chrome
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
--no-install-recommends \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update && apt-get install -y \
google-chrome-stable \
--no-install-recommends
RUN apt-get update && apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
# It won't run from the root user.
RUN groupadd chrome && useradd -g chrome -s /bin/bash -G audio,video chrome \
&& mkdir -p /home/chrome && chown -R chrome:chrome /home/chrome
ADD . /var/app
ENV PRODUCTION True
ENV FORCE_SSL_REDIRECT True
EXPOSE 8080
EXPOSE 8000
ADD uwsgi-start.sh /
CMD []
ENTRYPOINT ["/uwsgi-start.sh"]