ABCD custom entrypoint

Posted by Adrianphp on Mon, 06 Jan 2020 01:09:57 +0100


This paper focuses on the use of jib custom entrypoint


							<arg>java ${JAVA_OPTS} -cp /app/resources/:/app/classes/:/app/libs/* com.example.JibDemoApplication</arg>
  • Here, the entrypoint is customized under the container tag, and then the environment variables are injected, so that the configuration of the jvm is not written in the pom file
  • The original entry point generated by jib by default is in quotation mark mode, such as
"Entrypoint": [

This mode does not seem to support environment variables, so you need to change it to the mode without quotation marks, and use the SH-C Java command to start it


docker run -p 8080:8080 -e JAVA_OPTS='-Xms512m -Xmx512m' --rm jib-demo:20180903

In this way, you can successfully use the Java? Opts environment variable to configure the JVM


The customized entrypoint of jib is supported only when it is 0.9.10 or above. If you need to customize entrypoint, please upgrade the version of jib first.


Topics: Java Maven jvm Google