Skip to content

Commit

Permalink
Update Dockerfile (cli, online) to use eclipse-temurin:17.0.3_7-jre-f…
Browse files Browse the repository at this point in the history
…ocal (#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
  • Loading branch information
wing328 authored Nov 23, 2023
1 parent 917d671 commit aaed846
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ 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
- run-in-docker.sh
- 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'
Expand All @@ -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
2 changes: 1 addition & 1 deletion modules/openapi-generator-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
7 changes: 0 additions & 7 deletions modules/openapi-generator-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -82,7 +79,6 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>static-analysis</id>
Expand All @@ -107,9 +103,7 @@
</build>
</profile>
</profiles>

<dependencies>

<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
Expand Down Expand Up @@ -155,5 +149,4 @@
<scope>test</scope>
</dependency>
</dependencies>

</project>
2 changes: 1 addition & 1 deletion modules/openapi-generator-online/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11
FROM eclipse-temurin:17.0.9_9-jre-focal

WORKDIR /generator

Expand Down

0 comments on commit aaed846

Please sign in to comment.