[问题已处理]-dockerfile 启动支持spring.profiles

dockerfile 启动支持spring.profiles

FROM registry.cn-shanghai.aliyuncs.com/yjk-datag/jdk:8u202

ENV LANG C.UTF-8
ENV PATH /usr/bin:$PATH
ADD ihaozhuo-servicecenter-6.0.1-SNAPSHOT.jar /srv/ihaozhuo-servicecenter-6.0.1-SNAPSHOT.jar
ENTRYPOINT ["java","-jar","/srv/ihaozhuo-servicecenter-6.0.1-SNAPSHOT.jar","-XX:MaxRAMPercentage=50.0  -XX:InitialRAMPercentage=50.0  -XX:MinRAMPercentage=50.0","--spring.profiles.active=test","-c"]

之前把命令行启动的命令粘进去 会启动失败报错或者无法使用test配置文件 会使用默认的配置文件dev的配置

ENTRYPOINT ["java","-jar","/srv/ihaozhuo-servicecenter-6.0.1-SNAPSHOT.jar","--spring.profiles.active=test","-XX:MaxRAMPercentage=50.0  -XX:InitialRAMPercentage=50.0  -XX:MinRAMPercentage=50.0"]

你可能感兴趣的:(问题已处理,容器)