swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.72k stars 6.02k forks source link

Dockerfile fix #12381

Closed dreglad closed 2 months ago

dreglad commented 2 months ago

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

PR checklist

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.

frantuma commented 2 months ago

Thanks!