加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
FROM maven:3-jdk-8-alpine
RUN set -x && \
apk add --no-cache bash
ENV GEN_DIR /opt/swagger-codegen
WORKDIR ${GEN_DIR}
VOLUME ${MAVEN_HOME}/.m2/repository
# Required from a licensing standpoint
COPY ./LICENSE ${GEN_DIR}
# Required to compile swagger-codegen
COPY ./google_checkstyle.xml ${GEN_DIR}
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
# NOTE: swagger-generator is not included here, it is available as swaggerapi/swagger-generator
COPY ./modules/swagger-codegen-maven-plugin ${GEN_DIR}/modules/swagger-codegen-maven-plugin
COPY ./modules/swagger-codegen-cli ${GEN_DIR}/modules/swagger-codegen-cli
COPY ./modules/swagger-codegen ${GEN_DIR}/modules/swagger-codegen
COPY ./modules/swagger-generator ${GEN_DIR}/modules/swagger-generator
COPY ./pom.xml ${GEN_DIR}
# Pre-compile swagger-codegen-cli
RUN mvn -am -pl "modules/swagger-codegen-cli" package
# This exists at the end of the file to benefit from cached layers when modifying docker-entrypoint.sh.
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["help"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化