Dockerfile文件内容
FROM jdd.io/jre:1.8.0_275
MAINTAINER 1103324414@qq.com
EXPOSE 8080
ADD target/gateway-1.0.0.jar gateway.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom", "-jar", "gateway.jar"]
CMD ["--spring.profiles.active=test"]
根据官网描述,综上最终容器运行的命令是:"java -jar gateway.jar --spring.profiles.active=test"
官网地址:https://docs.docker.com/engine/reference/builder/#entrypoint