2020-06-22 23:05:56 +08:00
|
|
|
# pig4cloud/java:8镜像增加了中文字体与wait-for-it.sh的支持
|
2020-05-22 22:13:55 +08:00
|
|
|
# 镜像链接:https://hub.docker.com/r/pig4cloud/java/
|
|
|
|
# wait-for-it.sh采用https://github.com/vishnubob/wait-for-it作为解决方案
|
2020-06-22 23:05:56 +08:00
|
|
|
FROM pig4cloud/java:8
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
|
|
MAINTAINER wangiegie@gmail.com
|
|
|
|
|
2020-05-22 22:13:55 +08:00
|
|
|
ARG JAR_FILE=./target/pig-auth.jar
|
2020-01-27 22:46:56 +08:00
|
|
|
|
2020-05-22 22:13:55 +08:00
|
|
|
# JVM调优参数等额外参数
|
|
|
|
ENV PARAMS ""
|
2019-02-01 21:06:59 +08:00
|
|
|
|
2020-05-22 22:13:55 +08:00
|
|
|
ENV NACOS_HOST pig-register
|
2019-02-01 21:06:59 +08:00
|
|
|
|
2020-05-22 22:13:55 +08:00
|
|
|
ENV NACOS_PORT 8848
|
|
|
|
|
|
|
|
ENV TZ=PRC
|
|
|
|
|
|
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
|
|
|
|
WORKDIR /tmp
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
2020-05-22 22:13:55 +08:00
|
|
|
ADD ${JAR_FILE} ./app.jar
|
2019-02-01 21:06:59 +08:00
|
|
|
|
2020-05-22 22:46:27 +08:00
|
|
|
ENTRYPOINT ["wait-for-it.sh","$NACOS_HOST:$NACOS_PORT","--","java", "-jar","app.jar" , "-Djava.security.egd=file:/dev/./urandom","$PARAMS"]
|