Skip to content

Commit aaed846

Browse files
authored
Update Dockerfile (cli, online) to use eclipse-temurin:17.0.3_7-jre-focal (#17139)
* add tests for openapi-generator-cli dockerfile * trigger workflow * add cp * restore * use eclipse-temurin:17.0.3_7-jre-focal * update dockerfile * update image to newer version
1 parent 917d671 commit aaed846

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.github/workflows/docker.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ on:
99
- pom.xml
1010
- modules/openapi-generator-online/pom.xml
1111
- modules/openapi-generator-online/Dockerfile
12+
- modules/openapi-generator-cli/pom.xml
13+
- modules/openapi-generator-cli/Dockerfile
1214
pull_request:
1315
paths:
1416
- Dockerfile
1517
- run-in-docker.sh
1618
- pom.xml
1719
- modules/openapi-generator-online/pom.xml
1820
- modules/openapi-generator-online/Dockerfile
21+
- modules/openapi-generator-cli/pom.xml
22+
- modules/openapi-generator-cli/Dockerfile
1923
jobs:
2024
build:
2125
name: 'Build: Docker'
@@ -38,3 +42,12 @@ jobs:
3842
shell: bash
3943
run: |
4044
docker build modules/openapi-generator-online/ -t test
45+
- name: Build and test modules/openapi-generator-cli
46+
shell: bash
47+
run: |
48+
cp docker-entrypoint.sh ./modules/openapi-generator-cli
49+
docker build modules/openapi-generator-cli/ -t cli-test
50+
docker run --rm -v "${PWD}:/local" cli-test generate \
51+
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
52+
-g go \
53+
-o /local/out/go

modules/openapi-generator-cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:11.0-jre-buster
1+
FROM eclipse-temurin:17.0.9_9-jre-focal
22

33
ADD target/openapi-generator-cli.jar /opt/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar
44

modules/openapi-generator-cli/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
<relativePath>../..</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>
12-
1312
<artifactId>openapi-generator-cli</artifactId>
1413
<packaging>jar</packaging>
15-
1614
<name>openapi-generator (executable)</name>
17-
1815
<build>
1916
<finalName>openapi-generator-cli</finalName>
2017
<resources>
@@ -82,7 +79,6 @@
8279
</plugin>
8380
</plugins>
8481
</build>
85-
8682
<profiles>
8783
<profile>
8884
<id>static-analysis</id>
@@ -107,9 +103,7 @@
107103
</build>
108104
</profile>
109105
</profiles>
110-
111106
<dependencies>
112-
113107
<dependency>
114108
<groupId>org.openapitools</groupId>
115109
<artifactId>openapi-generator</artifactId>
@@ -155,5 +149,4 @@
155149
<scope>test</scope>
156150
</dependency>
157151
</dependencies>
158-
159152
</project>

modules/openapi-generator-online/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:11
1+
FROM eclipse-temurin:17.0.9_9-jre-focal
22

33
WORKDIR /generator
44

0 commit comments

Comments
 (0)