-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile.legacy
92 lines (89 loc) · 3.13 KB
/
Dockerfile.legacy
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
FROM python:3.8-slim-buster
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt -qq update && \
apt -qq -y --no-install-recommends install \
apt-transport-https \
gnupg \
man-db \
software-properties-common \
wget && \
add-apt-repository "deb http://ftp.us.debian.org/debian stretch main" && \
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - && \
add-apt-repository "deb https://artifacts.elastic.co/packages/7.x/apt stable main" && \
apt -qq update && \
mkdir /usr/share/man/man1 && \
apt -q -y --no-install-recommends install \
antiword \
bzip2 \
cron \
curl \
elasticsearch \
emacs24-nox \
file \
g++ \
gcc \
git \
imagemagick \
libfontconfig1-dev \
libjpeg-dev \
liblcms2-dev \
libopenjp2-7-dev \
libreoffice \
libtiff-dev \
libtiff-tools \
libxml2-dev \
libxslt1-dev \
locales \
make \
mariadb-client \
mariadb-server \
mediawiki \
nginx \
openjdk-8-jre-headless \
pkg-config \
procps \
python3-dev \
python3-venv \
silversearcher-ag \
supervisor \
tesseract-ocr \
tesseract-ocr-swe \
uwsgi \
uwsgi-plugin-python3 \
xz-utils \
zlib1g-dev && \
wget https://poppler.freedesktop.org/poppler-0.56.0.tar.xz && \
xz -d poppler-0.56.0.tar.xz && \
tar xvf poppler-0.56.0.tar && \
cd poppler-0.56.0 && \
./configure && \
make install && \
cd .. && \
rm -r poppler-0.56.0 && \
ldconfig && \
wget https://github.com/htacg/tidy-html5/releases/download/5.4.0/tidy-5.4.0-64bit.deb && \
dpkg -i tidy-5.4.0-64bit.deb
RUN mkdir /opt/fuseki && \
cd /opt/fuseki && \
(curl -s http://apache.mirrors.spacedump.net/jena/binaries/apache-jena-fuseki-3.15.0.tar.gz | tar -xvz --strip-components=1 ) && \
mkdir -p run/databases/lagen && \
mkdir -p run/configuration
WORKDIR /usr/share/ferenda
COPY requirements.txt .
RUN python3.7 -m venv .virtualenv && \
./.virtualenv/bin/pip install wheel && \
./.virtualenv/bin/pip install -r requirements.txt
EXPOSE 80 8000 3030 9001 9200
COPY docker /tmp/docker
RUN mv /tmp/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf && \
mv /tmp/docker/nginx.conf /etc/nginx/sites-enabled/default && \
mv /tmp/docker/ferenda.ttl /opt/fuseki/run/configuration/ && \
mv /tmp/docker/locale.gen /etc/locale.gen && locale-gen && \
chmod +x /tmp/docker/build && mv /tmp/docker/build /usr/local/bin/build
COPY . .
# mv /tmp/docker/elasticsearch-jvm.options /etc/elasticsearch/jvm.options && \
ENTRYPOINT ["/bin/bash", "/tmp/docker/setup.sh"]
CMD ["/usr/bin/supervisord"] # starts nginx, elasticsearch, fuseki, cron etc
# docker build -t ferenda-image .
# then: docker run --name ferenda -d -v c:/docker/ferenda:/usr/share/ferenda/site -p 81:80 -p 3030:3030 -p 9001:9001 -p 9200:9200 -p 8000:8000 ferenda-image
# and then: docker exec ferenda build all all --force --refresh