What Can I Do If an Error Is Reported When a Deployed Container Is Started After the JVM Startup Heap Memory Parameter Is Specified for ENTRYPOINT in Dockerfile?
Problem Description
After the JVM startup heap memory parameter is specified for ENTRYPOINT in the Dockerfile, an error message "invalid initial heap size" is displayed during the deployed container's startup, as shown in the following figure:
Answer
Check the ENTRYPOINT settings. The following settings are incorrect:
ENTRYPOINT ["java","-Xms2g -Xmx2g","-jar","xxx.jar"]
You can use either of the following methods to solve the problem:
- (Recommended) Write the container startup command in Workloads > Container Settings > Lifecycle > Startup Command, then the container can be started properly.
- Change the format of the ENTRYPOINT startup command to the following:
ENTRYPOINT exec java -Xmx2g -Xms2g -jar xxxx.jar
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot