openjdk-runtime icon indicating copy to clipboard operation
openjdk-runtime copied to clipboard

Sample Dockerfile does not work with App Engine - flexible environment

Open psahgal opened this issue 4 years ago • 0 comments

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?

psahgal avatar Feb 01 '21 23:02 psahgal