-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
61 lines (50 loc) · 1.29 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM python:3.8-buster
# Install dependencies
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
build-essential \
libcurl4-openssl-dev \
libjpeg-dev \
vim \
ntp \
libpq-dev
RUN apt-get install -y --no-install-recommends \
git-core
RUN apt-get install -y --no-install-recommends \
postgresql-client \
libpq-dev \
python-psycopg2
RUN apt-get install -y --no-install-recommends \
python-gdal \
gdal-bin \
libgdal-dev \
libgdal20 \
libxml2-dev \
libxslt-dev \
xmlsec1
RUN pip install --upgrade \
setuptools \
pip \
wheel \
pipenv
# ssh
ENV SSH_PASSWD "root:Docker!"
RUN apt-get update \
&& apt-get install -y --no-install-recommends dialog \
&& apt-get update \
&& apt-get install -y --no-install-recommends openssh-server \
&& echo "$SSH_PASSWD" | chpasswd
COPY sshd_config /etc/ssh/
# python app
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH /code
RUN mkdir /code
ADD Pipfile /code/Pipfile
ADD Pipfile.lock /code/Pipfile.lock
WORKDIR /code/
# todo: try to figure out how we can test using dev packages and exclude them from prod build at the same time...
RUN pipenv install --ignore-pipfile --dev
ADD . /code/
# cleanup env files if any
RUN find . -type f -name '.env' -delete
EXPOSE 8000 2222