2019-04-19 08:53:40 +00:00
|
|
|
FROM openjdk:8-jdk-alpine
|
2018-10-17 22:04:06 +00:00
|
|
|
LABEL maintainer="Ryan Wang<i@ryanc.cc>"
|
|
|
|
|
|
|
|
WORKDIR /opt/halo
|
|
|
|
ADD . /tmp
|
2018-12-28 14:50:31 +00:00
|
|
|
ENV TZ=Asia/Shanghai \
|
|
|
|
DB_USER="admin" \
|
|
|
|
DB_PASSWORD="123456"
|
2018-12-05 09:17:24 +00:00
|
|
|
|
2018-12-28 16:26:52 +00:00
|
|
|
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone
|
2018-10-17 22:04:06 +00:00
|
|
|
|
2019-04-19 08:53:40 +00:00
|
|
|
RUN cd /tmp && ./gradlew bootjar && mv build/libs/* /opt/halo/ \
|
|
|
|
&& rm -rf /tmp/* && rm -rf ~/.gradle
|
2018-10-17 22:04:06 +00:00
|
|
|
|
|
|
|
EXPOSE 8090
|
|
|
|
|
2019-04-19 08:53:40 +00:00
|
|
|
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dlogging.level.run.halo.app=INFO", "-jar","/opt/halo/halo-1.0.0.jar","--spring.datasource.username=${DB_USER}","--spring.datasource.password=${DB_PASSWORD}"]
|