加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.hub.cli.dockerfile 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
## The builder labeled image acts as a transient container which is meant to
## hold all non-artifact code.
##
## You can build _just_ this part with:
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
FROM maven:3.6.3-jdk-11-openj9 as builder
ENV GEN_DIR /opt/openapi-generator
WORKDIR ${GEN_DIR}
COPY . ${GEN_DIR}
# Pre-compile openapi-generator-cli
RUN mvn -am -pl "modules/openapi-generator-cli" package
## The final (release) image
## The resulting container here only needs the target jar
## and ca-certificates (to be able to query HTTPS hosted specs)
FROM openjdk:11.0.8-jre-slim-buster
ENV GEN_DIR /opt/openapi-generator
RUN mkdir -p ${GEN_DIR}/modules/openapi-generator-cli/target
WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target
COPY --from=builder ${GEN_DIR}/modules/openapi-generator-cli/target/openapi-generator-cli.jar ${GEN_DIR}/modules/openapi-generator-cli/target/openapi-generator-cli.jar
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["help"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化