-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
47 lines (43 loc) · 1.75 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
FROM mongo:4.2.24-bionic
MAINTAINER zcw
ENV TZ=Asia/Shanghai
# Import MongoDB GPG key
# RUN apt-get update && apt-get install -y gnupg
# RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 4B7C549A058F8B6B
# Install wget
# RUN apt-get install -y --no-install-recommends wget
ADD run.sh /root/
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends wget unzip vim libssl1.0-dev; \
# install font
apt-get install -y xvfb libXrender* libfontconfig*; \
apt-get install -y \
fonts-arphic-bkai00mp \
fonts-arphic-bsmi00lp \
fonts-arphic-gbsn00lp \
fonts-arphic-gkai00mp \
fonts-arphic-ukai \
fonts-arphic-uming \
ttf-wqy-zenhei \
ttf-wqy-microhei \
xfonts-wqy; \
rm -rf /var/lib/apt/lists/*; \
# download wkhtmltopdf
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz; \
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz; \
cp wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf; \
chmod +x /usr/local/bin/wkhtmltopdf; \
rm -rf wkhtmltox wkhtmltox-0.12.4_linux-generic-amd64.tar.xz ;\
#download leanote
wget https://github.com/zhang-yun-jie/leanote/releases/download/v2.7.7/leanote-linux-amd64-2.7.7.zip -O /root/leanote.zip; \
unzip /root/leanote.zip -d /root/ ;\
rm -f /root/leanote.zip ;\
chmod a+x /root/run.sh ;\
chmod a+x /root/leanote/bin/run.sh ;\
echo 'export QT_QPA_PLATFORM=offscreen' >> ~/.bashrc ;\
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime ;\
echo $TZ > /etc/timezone
EXPOSE 9000 27017
# CMD ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && /bin/bash /root/run.sh
CMD /bin/bash /root/run.sh