jenkins自动发布之java项目
java项目 微服务 安装插件 Maven Integration Dockerfile FROM openjdk:8-jre-slim MAINTAINER yanyong ARG ACTIVE ENV JAVA_OPT="-Xms1g -Xmx1g" ENV JAVA_ARG="--spring.profiles.active=$ACTIVE" RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && echo 'Asia/Shanghai' > /etc/timezone ADD target/*.jar /opt/app.jar CMD ["sh","-c","exec java $JAVA_OPT -jar /opt/app.jar $JAVA_ARG"] deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: megaordermiddleware-basic-gateway spec: selector: matchLabels: app: megaordermiddleware-basic-gateway replicas: 2 template: metadata: labels: app: megaordermiddleware-basic-gateway spec: containers: