-
Notifications
You must be signed in to change notification settings - Fork 119
/
Dockerfile
29 lines (20 loc) · 913 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
FROM maven:3.6.1-jdk-8
LABEL MAINTAINER [email protected],[email protected]
ENV deploy_path /home/admin/deploy
COPY . $deploy_path/source
RUN mkdir -p /root/.m2 && \
cd $deploy_path/source && \
mv docker/settings-aliyun.xml /root/.m2/settings.xml && \
mv docker/entrypoint.sh $deploy_path/entrypoint.sh && \
chmod a+x $deploy_path/entrypoint.sh && \
mvn clean package -Psofaark -B -e -T 1C -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Dmaven.test.skip=true -am -pl boot/all-in-one-bootstrap && \
mv $deploy_path/source/boot/all-in-one-bootstrap/target/allinone-executable.jar $deploy_path/app.jar && \
cd ~ && \
rm -rf /root/.m2 $deploy_path/source && \
useradd admin && \
chown -R admin:admin /home/admin
EXPOSE 6200 7200 9090
VOLUME /home/admin/logs /home/admin/lookout_gateway_queue_cache
USER admin
WORKDIR /home/admin
ENTRYPOINT ["/home/admin/deploy/entrypoint.sh"]