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

Dockerfile fix #12381

Merged
merged 2 commits into from
Apr 30, 2024
Merged

Dockerfile fix #12381

merged 2 commits into from
Apr 30, 2024

Conversation

dreglad
Copy link
Contributor

@dreglad dreglad commented Apr 23, 2024

Dockerfile base image had changed from Alpine to Ubun, breaking Docker image build

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Fixes in Dockerfile:

1. Updated base image

As described in #12158, the Docker build is broken since the base image was changed from Alpine to Ubuntu.

2. Added GEN_DIR as Build Argument

The WORKDIR was previously set by an environment variable GEN_DIR at build time. This setup doesn't make sense as it always resolves to the same default value, which makes the Dockerfile harder to read and prone to errors if anyone actually tries to customize this value
Assuming there's a valid reason for allowing this to be dynamically set, I've added a build argument (ARG instruction) before ENV, so it can actually be used effectively.

Dockerfile base image had changed from Alpine to Ubun, breaking Docker image build
@frantuma frantuma self-assigned this Apr 30, 2024
@frantuma frantuma merged commit da36c80 into swagger-api:master Apr 30, 2024
11 of 12 checks passed
@frantuma
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants