File tree 6 files changed +13
-12
lines changed
6 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 1
1
name : Docker tests
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
push :
5
6
paths :
6
7
- Dockerfile
27
28
shell : bash
28
29
run : |
29
30
sed -i 's/ -it / /g' run-in-docker.sh
30
- ./run-in-docker.sh mvn clean install
31
+ ./run-in-docker.sh mvn -B clean install
31
32
32
33
- name : Build Dockerfile
33
34
shell : bash
Original file line number Diff line number Diff line change 3
3
# #
4
4
# # You can build _just_ this part with:
5
5
# # docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
6
- FROM maven:3.6.3-jdk-11-openj9 as builder
6
+ FROM maven:3-eclipse-temurin-17 as builder
7
7
8
8
ENV GEN_DIR /opt/openapi-generator
9
9
WORKDIR ${GEN_DIR}
10
10
COPY . ${GEN_DIR}
11
11
12
12
# Pre-compile openapi-generator-cli
13
- RUN mvn -am -pl "modules/openapi-generator-cli" package
13
+ RUN mvn -B - am -pl "modules/openapi-generator-cli" package
14
14
15
15
# # The final (release) image
16
16
# # The resulting container here only needs the target jar
17
17
# # and ca-certificates (to be able to query HTTPS hosted specs)
18
- FROM openjdk:11.0.8 -jre-slim-buster
18
+ FROM eclipse-temurin:17 -jre
19
19
20
20
ENV GEN_DIR /opt/openapi-generator
21
21
Original file line number Diff line number Diff line change 3
3
# #
4
4
# # You can build _just_ this part with:
5
5
# # docker --target builder -t container-name:builder -f .hub.online.dockerfile .
6
- FROM maven:3.6.3-jdk-11-openj9 as builder
6
+ FROM maven:3-eclipse-temurin-17 as builder
7
7
8
8
ENV GEN_DIR /opt/openapi-generator
9
9
WORKDIR ${GEN_DIR}
10
10
COPY . ${GEN_DIR}
11
11
12
12
# Pre-compile openapi-generator-online
13
- RUN mvn -am -pl "modules/openapi-generator-online" package
13
+ RUN mvn -B - am -pl "modules/openapi-generator-online" package
14
14
15
15
# # The final (release) image
16
16
# # The resulting container here only needs the target jar
17
- FROM openjdk:11.0.8 -jre-slim-buster
17
+ FROM eclipse-temurin:17 -jre
18
18
19
19
ENV GEN_DIR /opt/openapi-generator
20
20
ENV TARGET_DIR /generator
Original file line number Diff line number Diff line change 1
- FROM maven:3.6.3-jdk-11-openj9
1
+ FROM maven:3-eclipse-temurin-17
2
2
3
3
ENV GEN_DIR /opt/openapi-generator
4
4
WORKDIR ${GEN_DIR}
@@ -20,7 +20,7 @@ COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
20
20
COPY ./pom.xml ${GEN_DIR}
21
21
22
22
# Pre-compile openapi-generator-cli
23
- RUN mvn -am -pl "modules/openapi-generator-cli" package
23
+ RUN mvn -B - am -pl "modules/openapi-generator-cli" package
24
24
25
25
# This exists at the end of the file to benefit from cached layers when modifying docker-entrypoint.sh.
26
26
COPY docker-entrypoint.sh /usr/local/bin/
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ set -euo pipefail
4
4
5
5
# GEN_DIR allows to share the entrypoint between Dockerfile and run-in-docker.sh (backward compatible)
6
6
GEN_DIR=${GEN_DIR:-/ opt/ openapi-generator}
7
- JAVA_OPTS=${JAVA_OPTS:- " -Xmx1024M - DloggerPath=conf/log4j.properties" }
7
+ JAVA_OPTS=${JAVA_OPTS:- " -DloggerPath=conf/log4j.properties" }
8
8
9
9
cli=" ${GEN_DIR} /modules/openapi-generator-cli"
10
10
codegen=" ${cli} /target/openapi-generator-cli.jar"
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ docker run --rm -it \
15
15
-w /gen \
16
16
-e GEN_DIR=/gen \
17
17
-e MAVEN_CONFIG=/var/maven/.m2 \
18
- -e MAVEN_OPTS=" -Dhttps.protocols=TLSv1.2 - Dmaven.repo.local=/var/maven/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Djacoco.skip=true" \
18
+ -e MAVEN_OPTS=" -Dmaven.repo.local=/var/maven/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Djacoco.skip=true" \
19
19
-u " $( id -u) :$( id -g) " \
20
20
-v " ${PWD} :/gen" \
21
21
-v " ${PWD} /CI/run-in-docker-settings.xml:/var/maven/.m2/settings.xml" \
22
22
-v " ${maven_cache_repo} :/var/maven/.m2/repository" \
23
23
--entrypoint /gen/docker-entrypoint.sh \
24
- maven:3-jdk-11 " $@ "
24
+ maven:3-eclipse-temurin-17 " $@ "
You can’t perform that action at this time.
0 commit comments