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
This commit is contained in:
William Cheng 2023-11-23 11:08:31 +08:00 committed by GitHub
parent 917d671d2c
commit aaed846f5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 9 deletions

View File

@ -9,6 +9,8 @@ on:
- pom.xml
- modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile
- modules/openapi-generator-cli/pom.xml
- modules/openapi-generator-cli/Dockerfile
pull_request:
paths:
- Dockerfile
@ -16,6 +18,8 @@ on:
- pom.xml
- modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile
- modules/openapi-generator-cli/pom.xml
- modules/openapi-generator-cli/Dockerfile
jobs:
build:
name: 'Build: Docker'
@ -38,3 +42,12 @@ jobs:
shell: bash
run: |
docker build modules/openapi-generator-online/ -t test
- name: Build and test modules/openapi-generator-cli
shell: bash
run: |
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker build modules/openapi-generator-cli/ -t cli-test
docker run --rm -v "${PWD}:/local" cli-test generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-g go \
-o /local/out/go

View File

@ -1,4 +1,4 @@
FROM openjdk:11.0-jre-buster
FROM eclipse-temurin:17.0.9_9-jre-focal
ADD target/openapi-generator-cli.jar /opt/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar

View File

@ -9,12 +9,9 @@
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openapi-generator-cli</artifactId>
<packaging>jar</packaging>
<name>openapi-generator (executable)</name>
<build>
<finalName>openapi-generator-cli</finalName>
<resources>
@ -82,7 +79,6 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>static-analysis</id>
@ -107,9 +103,7 @@
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
@ -155,5 +149,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,4 +1,4 @@
FROM openjdk:11
FROM eclipse-temurin:17.0.9_9-jre-focal
WORKDIR /generator