地址:
registry.cn-hangzhou.aliyuncs.com/baimeidashu-k8s/sprinboot-jar-demo-jvm:v1
curl 10.233.108.237:8080
java -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555 -Dcom.sun.management.jmxremote.authenticate=false -jar springboot-demo.jar --server.port=8888
Dockerfile
FROM openjdk:8u212-jre-alpine3.9
LABEL maintainer=zhaozhiyong
#ENV PARAMS="--spring.profiles.active=test"
ENV PARAMS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555 -Dcom.sun.management.jmxremote.authenticate=false"
#RUN /usr/bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
COPY ./*.jar /app.jar
EXPOSE 8080
EXPOSE 5555
#
ENTRYPOINT ["/bin/sh","-c","java -Dfile.encoding=utf8 -Djava.security.egd=file:/dev/./urandom -jar app.jar ${PARAMS}"]
打镜像
docker build -t registry.cn-hangzhou.aliyuncs.com/baimeidashu-k8s/sprinboot-jar-demo-jvm:v1 --no-cache .
欢迎来撩 : 汇总all