openjdk-runtime
openjdk-runtime copied to clipboard
Sample Dockerfile does not work with App Engine - flexible environment
I spent some time today trying to get up and running with the flexible environment on App Engine and I noticed the custom runtime did not work as expected. I was trying to get Java 11 running in the Flexible environment. When I used this as my Dockerfile, from the readme:
FROM gcr.io/google-appengine/openjdk
COPY your-application.jar $APP_DESTINATION
I ended up getting an error message from gcloud app deploy
, stating that the application container had crashed. After some trial and error, I found that this Dockerfile worked instead:
FROM openjdk:11
ADD your-application.jar
ENTRYPOINT ["java","-jar","./app.jar"]
Without the ENTRYPOINT
command, the container crashed.
Would someone be able to update the documentation, and maybe explain why the Dockerfile in the readme didn't work for me?