forked from loafle/openapi-generator-original
fix: update base image to maven supported (#7001)
* Updates docker images for CLI and Online to JDK 11 and Maven 3.6.3 builders * Uses openjdk:11.0.8-jre-slim-buster rather than alpine as new image publishes CVEs
This commit is contained in:
parent
c1de6c2651
commit
5e79aaaf0a
@ -3,10 +3,7 @@
|
||||
##
|
||||
## You can build _just_ this part with:
|
||||
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
|
||||
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
|
||||
|
||||
RUN set -x && \
|
||||
apk add --no-cache bash
|
||||
FROM maven:3.6.3-jdk-11-openj9 as builder
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
WORKDIR ${GEN_DIR}
|
||||
@ -18,11 +15,10 @@ 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:8-jre-alpine
|
||||
FROM openjdk:11.0.8-jre-slim-buster
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
|
||||
RUN apk --no-cache add ca-certificates bash
|
||||
RUN mkdir -p ${GEN_DIR}/modules/openapi-generator-cli/target
|
||||
|
||||
WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target
|
||||
|
@ -3,10 +3,7 @@
|
||||
##
|
||||
## You can build _just_ this part with:
|
||||
## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
|
||||
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
|
||||
|
||||
RUN set -x && \
|
||||
apk add --no-cache bash
|
||||
FROM maven:3.6.3-jdk-11-openj9 as builder
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
WORKDIR ${GEN_DIR}
|
||||
@ -17,7 +14,7 @@ RUN mvn -am -pl "modules/openapi-generator-online" package
|
||||
|
||||
## The final (release) image
|
||||
## The resulting container here only needs the target jar
|
||||
FROM openjdk:8-jre-alpine
|
||||
FROM openjdk:11.0.8-jre-slim-buster
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
ENV TARGET_DIR /generator
|
||||
|
@ -1,7 +1,4 @@
|
||||
FROM jimschubert/8-jdk-alpine-mvn:1.0
|
||||
|
||||
RUN set -x && \
|
||||
apk add --no-cache bash
|
||||
FROM maven:3.6.3-jdk-11-openj9
|
||||
|
||||
ENV GEN_DIR /opt/openapi-generator
|
||||
WORKDIR ${GEN_DIR}
|
||||
@ -29,6 +26,6 @@ RUN mvn -am -pl "modules/openapi-generator-cli" package
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN ln -s /usr/local/bin/docker-entrypoint.sh /usr/local/bin/openapi-generator
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
|
||||
CMD ["help"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user