How to pass flags to java process in Docker contatiner built by Cloud Native Buildpacks (CNB)
问题 Normally when I create Docker image I do something like this: FROM openjdk:15-jdk-slim ARG version=undefined LABEL version=${version} WORKDIR / COPY build/libs/v2t-api-$version.jar /v2t-api.jar USER nobody VOLUME ["/tmp"] EXPOSE 8080 EXPOSE 8081 ENTRYPOINT ["sh", "-c", "exec java ${JAVA_OPTS} -jar v2t-api.jar"] So, when I start my container in for example kubernetes I can set JAVA_OPTS which defines how many memory is available for heap or how many CPUs are actually there. Packaging OCI