mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 05:00:25 +08:00
19 lines
662 B
Docker
19 lines
662 B
Docker
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目录
|
||
VOLUME /tmp
|
||
|
||
# 复制jar到镜像
|
||
ADD target/laboratory.jar app.jar
|
||
|
||
ENTRYPOINT ["java", "-Xmx128m", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/app.jar"]
|
||
|
||
EXPOSE 8000
|
||
|
||
|
||
|