FROM oraclejdk:8u291-alpine3.13
MAINTAINER <joshualwork@163.com>
LABEL version = "1.0.0" description = "云环境"
ENV PAAS_CSE_SC_ENDPOINT ""
ENV PAAS_CSE_CC_ENDPOINT ""
ENV PAAS_PROJECT_NAME ""
ENV CAS_APPLICATION_NAME ""
ENV SERVER_PORT 80
ENV PROFILE_ACTIVE "testing"
WORKDIR /opt/
COPY gateway-boot-1.0-SNAPSHOT.jar /opt
RUN chmod +x *.jar
EXPOSE ${SERVER_PORT}
CMD ["--server.port=${SERVER_PORT}","--server.env=${PROFILE_ACTIVE}","--spring.profiles.active=${PROFILE_ACTIVE}","--spring.cloud.servicecomb.discovery.serviceName=${PAAS_PROJECT_NAME}","--spring.cloud.servicecomb.discovery.appName=${CAS_APPLICATION_NAME}","--spring.cloud.servicecomb.discovery.address=${PAAS_CSE_SC_ENDPOINT}","--spring.cloud.servicecomb.config.serverAddr=${PAAS_CSE_CC_ENDPOINT}"]
ENTRYPOINT ["java","-Xms256m","-Xmx512m","-Dfile.encoding=UTF-8","-jar","gateway-boot-1.0-SNAPSHOT.jar"]