-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
214 lines (214 loc) · 5.8 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
FROM ubuntu:24.04
RUN DEBIAN_FRONTEND=noninteractive TERM=xterm \
apt-get -y update \
&& apt-get -y upgrade
RUN DEBIAN_FRONTEND=noninteractive TERM=xterm \
ln -snf /usr/share/zoneinfo/America/New_York /etc/localtime \
&& echo America/New_York > /etc/timezone \
&& echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections \
&& apt-get -q -y install language-pack-en \
&& apt-get -q -y install \
apt-utils \
tzdata \
wget \
unzip \
git \
locales \
nginx \
apache2 \
apache2-utils \
apache2-dev \
postgresql \
libapache2-mod-xsendfile \
gcc \
supervisor \
s4cmd \
make \
perl \
libinline-perl \
libparallel-forkmanager-perl \
autoconf \
automake \
libjpeg-dev \
libpq-dev \
logrotate \
npm \
cron \
libxml2 \
libxslt1.1 \
libu2f-udev \
libvulkan1 \
libxml2-dev \
libxslt1-dev \
libcurl4-openssl-dev \
libssl-dev \
redis-server \
rabbitmq-server \
libtool \
libtool-bin \
syslog-ng \
rsync \
curl \
dnsutils \
build-essential \
libsvm3 \
libsvm-dev \
liblinear4 \
liblinear-dev \
libzbar-dev \
libzbar0 \
libgs-dev \
default-libmysqlclient-dev \
libgmp-dev \
python3-passlib \
python3-pip \
python3-venv \
libsasl2-dev \
libldap2-dev \
exim4-daemon-heavy \
imagemagick \
pdftk \
pacpl \
pandoc \
texlive \
texlive-luatex \
texlive-xetex \
texlive-latex-recommended \
texlive-latex-extra \
texlive-font-utils \
texlive-fonts-extra \
texlive-lang-all \
texlive-extra-utils \
poppler-utils \
libaudio-flac-header-perl \
libaudio-musepack-perl \
libmp3-tag-perl \
libogg-vorbis-header-pureperl-perl \
libvorbis-dev \
libcddb-perl \
libcddb-get-perl \
libmp3-tag-perl \
libaudio-scan-perl \
libaudio-flac-header-perl \
ffmpeg \
tesseract-ocr-all \
libtesseract-dev \
wkhtmltopdf \
fonts-ebgaramond-extra \
ghostscript \
fonts-liberation \
fonts-noto \
fonts-noto-core \
fonts-noto-extra \
fonts-indic \
fonts-deva \
fonts-gujr \
fonts-guru \
fonts-deva-extra \
fonts-gujr-extra \
fonts-guru-extra \
fonts-lato \
fonts-liberation2 \
fonts-knda \
fonts-mlym \
fonts-orya \
fonts-smc \
fonts-taml \
fonts-telu \
fonts-telu-extra \
fonts-samyak \
fonts-arkpandora \
cm-super \
qpdf \
wamerican \
libreoffice \
zlib1g-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
liblapack-dev \
libblas-dev \
gfortran \
unixodbc-dev \
libaugeas0 \
busybox
RUN DEBIAN_FRONTEND=noninteractive TERM=xterm \
apt-get -q -y install \
libgdbm-dev \
libdb5.3-dev \
libbz2-dev \
libexpat1-dev \
liblzma-dev \
libffi-dev \
uuid-dev \
&& cd /tmp \
&& wget http://mirrors.kernel.org/ubuntu/pool/universe/p/pdftk-java/pdftk-java_3.3.3-2_all.deb \
&& dpkg -i pdftk-java_3.3.3-2_all.deb \
&& rm pdftk-java_3.3.3-2_all.deb \
&& apt-get -y remove libreoffice-report-builder \
&& apt-get -q -y install ttf-mscorefonts-installer \
&& apt-get -q -y remove nodejs \
&& apt-get -q -y remove nodejs-doc \
&& apt-get -q -y autoremove \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash \
&& apt-get install -y nodejs \
&& apt-get -y autoremove \
&& npm install -g @mermaid-js/mermaid-cli
RUN DEBIAN_FRONTEND=noninteractive TERM=xterm \
bash -c \
'cd /tmp && if [[ "$(dpkg --print-architecture)" == "amd64" ]]; then wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && dpkg -i ./google-chrome-stable_current_amd64.deb && rm ./google-chrome-stable_current_amd64.deb && wget -q https://github.com/jgm/pandoc/releases/download/3.5/pandoc-3.5-1-amd64.deb && dpkg -i pandoc-3.5-1-amd64.deb && rm pandoc-3.5-1-amd64.deb; elif [[ "$(dpkg --print-architecture)" == "arm64" ]]; then wget -q https://github.com/jgm/pandoc/releases/download/3.5/pandoc-3.5-1-arm64.deb && dpkg -i pandoc-3.5-1-arm64.deb && rm pandoc-3.5-1-arm64.deb; fi'
RUN DEBIAN_FRONTEND=noninteractive TERM=xterm \
cd /tmp \
&& wget -q -O google-fonts.tar.gz https://github.com/google/fonts/archive/main.tar.gz \
&& tar -zxf google-fonts.tar.gz \
&& rm google-fonts.tar.gz \
&& mkdir -p /usr/share/fonts/truetype/google-fonts \
&& find ./fonts-main/ -name "*.ttf" -exec install -m644 {} /usr/share/fonts/truetype/google-fonts/ \; \
&& rm -r ./fonts-main \
&& fc-cache -f -v \
&& sed -i 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read | write" pattern="PDF" \/>/' /etc/ImageMagick-6/policy.xml \
&& sed -i 's/^#PATH/PATH/' /etc/crontab
RUN DEBIAN_FRONTEND=noninteractive TERM=xterm \
cd /tmp \
&& mkdir -p /etc/ssl/docassemble \
/usr/share/docassemble/local3.10 \
/usr/share/docassemble/certs \
/usr/share/docassemble/backup \
/usr/share/docassemble/config \
/usr/share/docassemble/webapp \
/usr/share/docassemble/files \
/usr/share/docassemble/cron \
/usr/share/docassemble/syslogng \
/var/www/.pip \
/var/www/.cache \
/var/run/uwsgi \
/var/run/docassemble \
/usr/share/docassemble/log \
/tmp/docassemble \
/var/www/html/log \
/var/www/nascent \
&& chown -R www-data:www-data /var/www \
&& chown www-data:www-data /var/run/uwsgi \
&& chsh -s /bin/bash www-data \
&& curl -sL https://aka.ms/InstallAzureCLIDeb | bash \
&& wget https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tgz \
&& tar xzf Python-3.10.6.tgz \
&& cd Python-3.10.6 \
&& ./configure --enable-optimizations --enable-shared --prefix=/usr \
&& make \
&& make altinstall
USER www-data
RUN bash -c \
"echo '{ \"args\": [\"--no-sandbox\"], \"executablePath\": \"/usr/bin/google-chrome\" }' > ~/puppeteer-config.json"
USER root
RUN bash -c "\
if [[ \"$(dpkg --print-architecture)\" == \"arm64\" ]]; then \
sed -i \"s/scram-sha-256$/md5/\" /etc/postgresql/16/main/pg_hba.conf \
&& echo \"password_encryption = md5\" >> /etc/postgresql/16/main/postgresql.conf; \
echo \"host all all 0.0.0.0/0 md5\" >> /etc/postgresql/16/main/pg_hba.conf; \
else \
echo \"host all all 0.0.0.0/0 scram-sha-256\" >> /etc/postgresql/16/main/pg_hba.conf; \
fi; \
echo \"listen_addresses = '*'\" >> /etc/postgresql/16/main/postgresql.conf"
CMD ["bash"]