2016-05-24 18:11:57 +00:00
|
|
|
FROM jimschubert/8-jdk-alpine-mvn:1.0
|
2015-07-08 23:21:59 +00:00
|
|
|
|
2016-05-25 03:21:50 +00:00
|
|
|
RUN set -x && \
|
|
|
|
apk add --no-cache bash
|
|
|
|
|
2018-05-11 03:41:42 +00:00
|
|
|
ENV GEN_DIR /opt/openapi-generator
|
2017-11-20 17:29:09 +00:00
|
|
|
WORKDIR ${GEN_DIR}
|
|
|
|
VOLUME ${MAVEN_HOME}/.m2/repository
|
2015-07-08 23:21:59 +00:00
|
|
|
|
2017-11-20 17:29:09 +00:00
|
|
|
# Required from a licensing standpoint
|
|
|
|
COPY ./LICENSE ${GEN_DIR}
|
2016-05-25 03:21:50 +00:00
|
|
|
|
2018-05-11 03:41:42 +00:00
|
|
|
# Required to compile openapi-generator
|
2017-11-20 17:29:09 +00:00
|
|
|
COPY ./google_checkstyle.xml ${GEN_DIR}
|
2016-05-25 03:21:50 +00:00
|
|
|
|
2017-11-20 17:29:09 +00:00
|
|
|
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
|
2018-07-28 08:10:49 +00:00
|
|
|
COPY ./modules/openapi-generator-gradle-plugin ${GEN_DIR}/modules/openapi-generator-gradle-plugin
|
2018-05-11 03:41:42 +00:00
|
|
|
COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin
|
2018-07-28 08:10:49 +00:00
|
|
|
COPY ./modules/openapi-generator-online ${GEN_DIR}/modules/openapi-generator-online
|
2018-05-11 03:41:42 +00:00
|
|
|
COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli
|
|
|
|
COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
|
2017-11-20 17:29:09 +00:00
|
|
|
COPY ./pom.xml ${GEN_DIR}
|
2015-07-08 23:21:59 +00:00
|
|
|
|
2018-05-11 03:41:42 +00:00
|
|
|
# Pre-compile openapi-generator-cli
|
|
|
|
RUN mvn -am -pl "modules/openapi-generator-cli" package
|
2015-07-08 23:21:59 +00:00
|
|
|
|
2017-11-20 17:29:09 +00:00
|
|
|
# This exists at the end of the file to benefit from cached layers when modifying docker-entrypoint.sh.
|
2016-05-25 03:21:50 +00:00
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
2016-05-24 01:54:35 +00:00
|
|
|
|
2016-05-25 03:21:50 +00:00
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
2015-07-08 23:21:59 +00:00
|
|
|
|
2017-11-20 17:29:09 +00:00
|
|
|
CMD ["help"]
|