Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JDK17 images in Dockerfile #17076

Merged
merged 2 commits into from
Nov 16, 2023
Merged

Use JDK17 images in Dockerfile #17076

merged 2 commits into from
Nov 16, 2023

Conversation

wing328
Copy link
Member

@wing328 wing328 commented Nov 15, 2023

Use amazoncorretto:17.0.8-alpine3.18 which has 0 vulnerabilities.

a follow-up PR to #17007

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (For Windows users, please run the script in Git BASH)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.1.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@wing328 wing328 mentioned this pull request Nov 15, 2023
6 tasks
@wing328
Copy link
Member Author

wing328 commented Nov 15, 2023

@wing328 wing328 marked this pull request as ready for review November 15, 2023 09:47
@wing328 wing328 merged commit bae20c1 into master Nov 16, 2023
20 checks passed
@wing328 wing328 deleted the docker-jdk17 branch November 16, 2023 02:16
@daveset
Copy link

daveset commented Nov 16, 2023

@wing328 this switch to an Alpine-based image is failing to find bash:

 $ docker pull openapitools/openapi-generator-cli
Using default tag: latest
latest: Pulling from openapitools/openapi-generator-cli
96526aa774ef: Already exists 
40fc2491c1b6: Pull complete 
5343336bf20e: Pull complete 
9f8c878f941c: Pull complete 
Digest: sha256:2e2398f2ee5e95d57090254a5f00efa3302dbedbc4de3d355564a70cd63bc140
Status: Downloaded newer image for openapitools/openapi-generator-cli:latest
docker.io/openapitools/openapi-generator-cli:latest

$ docker run --rm openapitools/openapi-generator-cli:latest
env: can't execute 'bash': No such file or directory

It needs RUN apk add --no-cache bash added to the Dockerfiles.

I'll add that if there are downstream projects that use openapitools/openapi-generate-cli as a base image in their own dockerfiles, this could be a breaking change since it was previously using a debian-based image (apt install vs. apk add).

wing328 added a commit that referenced this pull request Nov 16, 2023
wing328 added a commit that referenced this pull request Nov 16, 2023
@wing328
Copy link
Member Author

wing328 commented Nov 16, 2023

thanks for pointing it out.

just reverted the change. i'll file another one and include a test to catch the issue moving forward.

@wing328
Copy link
Member Author

wing328 commented Nov 19, 2023

@daveset I've filed #17139 and add a test.

Please take a look when you've time. Thank you.

lwj5 pushed a commit to lwj5/openapi-generator that referenced this pull request Dec 5, 2023
* use jdk17 images in Dockerfile

* use amazoncorretto:17.0.8-alpine3.18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants