mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 22:50:53 +00:00
[docker] Update root Dockerfile (#6870)
This commit is contained in:
parent
04ee374328
commit
ebb96cbfb6
25
Dockerfile
25
Dockerfile
@ -1,22 +1,31 @@
|
|||||||
FROM jimschubert/8-jdk-alpine-mvn:1.0
|
FROM jimschubert/8-jdk-alpine-mvn:1.0
|
||||||
|
|
||||||
ENV GEN_DIR /opt/swagger-codegen
|
|
||||||
|
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
apk add --no-cache bash
|
apk add --no-cache bash
|
||||||
|
|
||||||
RUN mkdir /opt
|
ENV GEN_DIR /opt/swagger-codegen
|
||||||
|
WORKDIR ${GEN_DIR}
|
||||||
ADD . ${GEN_DIR}
|
|
||||||
|
|
||||||
VOLUME ${MAVEN_HOME}/.m2/repository
|
VOLUME ${MAVEN_HOME}/.m2/repository
|
||||||
|
|
||||||
WORKDIR ${GEN_DIR}
|
# 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 ./pom.xml ${GEN_DIR}
|
||||||
|
|
||||||
|
# Pre-compile swagger-codegen-cli
|
||||||
RUN mvn -am -pl "modules/swagger-codegen-cli" package
|
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/
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["build"]
|
CMD ["help"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user