Newer
Older
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM ubuntu:focal
MAINTAINER Dariusz Czerski <dcz@ipipan.waw.pl>
ENV DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
LANGUAGE=en_US:en \
TZ=Europe/Warsaw \
PYTHONUNBUFFERED=1 \
PYTHONFAULTHANDLER=1
ENV PACKAGES="\
binutils \
curl \
gdal-bin \
gettext \
git \
libproj-dev \
locales \
nginx \
postgresql-client \
python3-pip \
python3-setuptools \
python3-wheel \
python3.8 \
python3.8-dev \
syslinux \
tar \
tzdata \
unzip \
wget \
"
ENV DEV_PACKAGES="\
gpg-agent \
libcurl4-openssl-dev \
libssl-dev \
software-properties-common \
"
ADD requirements.txt /requirements.txt
RUN echo $TZ > /etc/timezone && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
apt update && \
apt install -y -f --no-install-recommends $PACKAGES $DEV_PACKAGES && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 && \
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
echo "LC_ALL=$LC_ALL" >> /etc/environment && \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
echo "LANG=$LANG" > /etc/locale.conf && \
locale-gen $LANG && \
pip install -r /requirements.txt && \
wget -O - http://download.sgjp.pl/apt/sgjp.gpg.key | apt-key add - && \
apt-add-repository http://download.sgjp.pl/apt/ubuntu && \
apt update && \
apt install -y -f --no-install-recommends morfeusz2 && \
wget http://download.sgjp.pl/morfeusz/20211017/Linux/20.04/64/morfeusz2-1.99.1-20211017-cp35.cp36.cp37.cp38.cp39-abi3-linux_x86_64.whl && \
pip install morfeusz2-1.99.1-20211017-cp35.cp36.cp37.cp38.cp39-abi3-linux_x86_64.whl && \
rm morfeusz2-1.99.1-20211017-cp35.cp36.cp37.cp38.cp39-abi3-linux_x86_64.whl && \
mkdir /run/nginx/ && \
apt purge $DEV_PACKAGES -y && \
apt autoremove --purge -y && \
rm -rf /root/.cache/ && \
rm -rf /usr/src/ && \
rm -rf /var/lib/apt/lists/*
ADD docker/config/uwsgi.ini /uwsgi.ini
ADD . /app
VOLUME /app
WORKDIR /app
ENTRYPOINT ["/app/docker/scripts/docker-entrypoint"]