在k8s中使用gradle构建java web项目镜像Dockerfile
在k8s中使用gradle构建java web项目镜像DockerfileFROM gradle:6-jdk8 AS buildCOPY --chown=gradle:gradle . /home/gradle/srcWORKDIR /home/gradle/srcRUN gradle build --no-daemonFROM openjdk:8-jre-slimEXPOSE 10010RUN
·
在k8s中使用gradle构建java web项目镜像Dockerfile
FROM gradle:6-jdk8 AS build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle build --no-daemon
FROM openjdk:8-jre-slim
EXPOSE 10010
RUN mkdir /app
COPY --from=build /home/gradle/src/build/libs/*.jar /app/website.jar
ENTRYPOINT ["java", "-jar","/app/wesite.jar"]
更多推荐
已为社区贡献5条内容
所有评论(0)