2021-09-22 00:01:10 +08:00
|
|
|
|
FROM openjdk:8-jre
|
|
|
|
|
MAINTAINER youlai youlaitech@163.com
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \&& echo 'Asia/Shanghai' >/etc/timezone
|
|
|
|
|
|
|
|
|
|
# /tmp 目录作为容器数据卷目录,SpringBoot内嵌Tomcat容器默认使用/tmp作为工作目录,任何向 /tmp 中写入的信息不会记录进容器存储层,从而保证容器存储层的无状态化
|
|
|
|
|
# 在宿主机的/var/lib/docker目录下创建一个临时文件并把它链接到容器中的/tmp目录
|
2021-06-07 01:49:41 +08:00
|
|
|
|
VOLUME /tmp
|
2021-09-22 00:01:10 +08:00
|
|
|
|
|
|
|
|
|
# 复制jar至镜像
|
|
|
|
|
ADD target/youlai-gateway.jar app.jar
|
|
|
|
|
|
2022-07-25 00:53:06 +08:00
|
|
|
|
ENTRYPOINT ["java", "-Xmx128m", "-Djava.security.egd=file:/dev/./urandom","-Dcsp.sentinel.app.type=1", "-jar", "/app.jar"]
|
2021-09-22 00:01:10 +08:00
|
|
|
|
|
2021-06-07 01:49:41 +08:00
|
|
|
|
EXPOSE 9999
|
2021-09-22 00:01:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|