forked from JPressProjects/jpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (25 loc) · 1003 Bytes
/
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
FROM maven:3.6-jdk-8-alpine
LABEL maintainer="Michael Yang<[email protected]>"
WORKDIR /opt/jpress
ADD . /tmp
ENV TZ=Asia/Shanghai
# 验证码图片渲染需要ttf的支持
RUN apk add --update ttf-dejavu
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo ${TZ} > /etc/timezone
RUN cd /tmp && \
cp -f /tmp/docker/build/settings.xml /usr/share/maven/conf/settings.xml && \
mvn package -Pci && \
mv starter/target/starter-2.0/* /opt/jpress/ && \
cp -f /tmp/docker/build/jpress.sh /opt/jpress/jpress.sh && \
chmod +x /opt/jpress/jpress.sh && \
cp -f /tmp/docker/build/jboot.properties /opt/jpress/config/jboot.properties && \
rm -rf /tmp && \
rm -rf ~/.m2 && \
rm -rf /opt/jpress/webapp/templates/NewJPress && \
rm -rf /opt/jpress/webapp/templates/BewTo && \
rm -rf /opt/jpress/jpress.bat && \
rm -rf /opt/jpress/config/undertow.txt && \
rm -rf /opt/jpress/config/install.lock
EXPOSE 8080
CMD ["/opt/jpress/jpress.sh", "start"]