You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SOP/dockerfile

25 lines
1.3 KiB

4 years ago
FROM java:8
VOLUME /tmp
VOLUME /sop
4 years ago
ADD sop-gateway/target/*.jar sop/sop-gateway/sop-gateway.jar
ADD sop-admin/sop-admin-server/target/*.jar sop/sop-admin/sop-admin.jar
ADD sop-website/target/*.jar sop/sop-website/sop-website.jar
4 years ago
ADD sop-auth/target/*.jar sop/sop-website/sop-auth.jar
4 years ago
ADD sop-example/sop-story/target/*.jar sop/sop-story/sop-story.jar
4 years ago
# JVM设置
ENV JAVA_OPTS="-Xms128m -Xmx128m"
# springboot配置文件
# --logging.file:日志
# --mysql.host:mysql地址
# --register.url:nacos地址
4 years ago
ENV CONF="--mysql.host=10.1.30.120:3306 --register.url=10.1.30.110:8848"
4 years ago
4 years ago
ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-gateway/sop-gateway.jar ${CONF} --logging.file.path=/sop/sop-gateway/log \
&& java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-admin/sop-admin.jar ${CONF} --logging.file.path=/sop/sop-admin/log \
&& java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-website/sop-website.jar ${CONF} --logging.file.path=/sop/sop-website/log \
&& java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-auth/sop-auth.jar ${CONF} --logging.file.path=/sop/sop-auth/log \
&& java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-story/sop-story.jar ${CONF} --logging.file.path=/sop/sop-story/log