halo/Dockerfile

16 lines
438 B
Docker
Raw Normal View History

2018-10-17 22:04:06 +00:00
FROM maven:3
LABEL maintainer="Ryan Wang<i@ryanc.cc>"
WORKDIR /opt/halo
ADD . /tmp
2018-12-05 09:17:24 +00:00
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2018-10-17 22:04:06 +00:00
2018-10-18 12:24:51 +00:00
RUN cd /tmp && mvn package -Pci && mv target/dist/halo/* /opt/halo/ \
2018-10-17 22:04:06 +00:00
&& rm -rf /tmp/* && rm -rf ~/.m2
EXPOSE 8090
2018-10-18 12:24:51 +00:00
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/opt/halo/halo-latest.jar","--spring.profiles.active=docker"]