Skip to content

[REQ] CLI Missing From System Path In Docker #15558

@ezrasingh

Description

@ezrasingh

Is your feature request related to a problem? Please describe.

I tried to leverage the openapitools/openapi-generator-cli:v6.6.0 Docker image for a multi-stage build.

I wanted to automate generator CLI to pre-process some spec files that will be included in the final image however, it seems the openapi-generator-cli image was intended for single use via docker run openapitools/openapi-generator-cli <cmd> <args>.

Here is a snippet of my intended use case:

FROM openapitools/openapi-generator-cli:v6.6.0 AS Builder

COPY .my-spec-files/ ..my-spec-files/
COPY scripts/generate-all-services.sh .

# ? My bash script expects "openapi-generator-cli" to be available from the system path
RUN ./generate-all-services.sh --working-dir /.my-spec-files --dest /clients

# ? i.e my runtime image
FROM busybox
COPY --from Builder /clients .

Describe the solution you'd like

Simply adding a symlink in the openapitools/openapi-generator-cli in the docker image for the docker-entrypoint.sh (wrapper for JAR runtime), would greatly simplify these sort of implementations.

Describe alternatives you've considered

Other than a symlink another alternative may be to alias the docker-entrypoint.


I could just use docker-entrypoint.sh in my bash script however for other developers on my team it may become unclear what process is being invoked there.

At most, it makes scripting around this Docker image much more semantic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions