构建java后端包的镜像

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"]



 date +"%Y%m%d%H%M"|xargs -I {} docker build -t gateway:{} -f Dockerfile .
 docker images|grep gateway|awk 'NR==1 {print $3}'|xargs -I {} docker run {} -d -e PAAS_CSE_SC_ENDPOINT=""


上一篇:冬季实战营第四期学习报告


下一篇:python获取拉钩岗位信息