🐳 Optimize image and Shrink size | closed #I1VKO2

This commit is contained in:
wangyifei 2020-09-17 09:27:05 +08:00
parent 8413ca6278
commit f2ee77d468
7 changed files with 19 additions and 22 deletions

View File

@ -1,8 +1,8 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
FROM moxm/java:1.8-full
MAINTAINER wangiegie@gmail.com
ENV TZ=Asia/Shanghai
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@ -14,4 +14,4 @@ EXPOSE 3000
ADD ./target/pig-auth.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-auth.jar
CMD sleep 60;java $JAVA_OPTS -jar pig-auth.jar

View File

@ -1,8 +1,8 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
FROM moxm/java:1.8-full
MAINTAINER wangiegie@gmail.com
ENV TZ=Asia/Shanghai
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@ -14,4 +14,4 @@ EXPOSE 9999
ADD ./target/pig-gateway.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-gateway.jar
CMD sleep 60;java $JAVA_OPTS -jar pig-gateway.jar

View File

@ -1,9 +1,8 @@
FROM pig4cloud/java:8-jre
FROM moxm/java:1.8-full
MAINTAINER wangiegie@gmail.com
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@ -15,7 +14,6 @@ EXPOSE 8848
ADD ./target/pig-register.jar ./
CMD sleep 30;java $JAVA_OPTS -jar pig-register.jar

View File

@ -1,8 +1,8 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
FROM moxm/java:1.8-full
MAINTAINER wangiegie@gmail.com
ENV TZ=Asia/Shanghai
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@ -14,4 +14,4 @@ EXPOSE 4000
ADD ./target/pig-upms-biz.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-upms-biz.jar
CMD sleep 60;java $JAVA_OPTS -jar pig-upms-biz.jar

View File

@ -1,8 +1,8 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
FROM moxm/java:1.8-full
MAINTAINER wangiegie@gmail.com
ENV TZ=Asia/Shanghai
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@ -14,4 +14,4 @@ EXPOSE 5002
ADD ./target/pig-codegen.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-codegen.jar
CMD sleep 60;java $JAVA_OPTS -jar pig-codegen.jar

View File

@ -1,8 +1,8 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
FROM moxm/java:1.8-full
MAINTAINER wangiegie@gmail.com
ENV TZ=Asia/Shanghai
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@ -14,4 +14,4 @@ EXPOSE 5001
ADD ./target/pig-monitor.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-monitor.jar
CMD sleep 60;java $JAVA_OPTS -jar pig-monitor.jar

View File

@ -1,9 +1,8 @@
FROM pig4cloud/java:8-jre
FROM moxm/java:1.8-full
MAINTAINER wangiegie@gmail.com
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone