Openapi-generator: The official OpenAPI Generator CLI Docker image does not respect JAVA_OPTS environment variable

Created on 10 Nov 2018  路  3Comments  路  Source: OpenAPITools/openapi-generator

Description

Setting JAVA_OPTS environment variable has no effect on the official OpenAPI Generator CLI Docker image.

openapi-generator version

Latest

Command line used for generation
$  docker run --rm -v ${PWD}:/local -e JAVA_OPTS="-Dlog.level=error" \
    openapitools/openapi-generator-cli generate \
    -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
    -g go \
    -o /local/out/go

-Dlog.level=error should set the logging level to error(#1000).
However, above command prints info and warning logs.

Suggest a fix/enhancement

I guess ENTRYPOINT in https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/Dockerfile should be modified so that it respects JAVA_OPTS environment variable.

Docker Bug

Most helpful comment

@kimamula I've fixed the issue. Please give it another try using latest image when you have time. 馃槍

All 3 comments

@kimamula Thanks for reporting this issue!

@OpenAPITools/generator-core-team
How about using docker-entrypoint.sh in modules/openapi-generator-cli/Dockerfile as well as Dockerfile ? 馃挕

@kimamula I've fixed the issue. Please give it another try using latest image when you have time. 馃槍

@ackintosh Thanks for the quick fix!

Was this page helpful?
0 / 5 - 0 ratings