I have build my application using the docker file on google gcp. I am trying to run my web application build/run on tomcat.
from ubuntu
COPY /mnt/opt/apache-tomcat-9.0.5/ /mnt/opt/apache-tomcat-9.0.5/
RUN apt update
COPY cronjob /etc/cron.d/cronjob
RUN chmod 0644 /etc/cron.d/cronjob
RUN crontab /etc/cron.d/cronjob
ENV CATALINA_HOME /mnt/opt/apache-tomcat-9.0.5
ENV PATH $CATALINA_HOME/bin:$PATH
ENV PATH /mnt/opt/java/jdk-10.0.1/bin:$PATH
ENV PORT 80
ENV HOST 0.0.0.0
EXPOSE 80 443
CMD /mnt/opt/apache-tomcat-9.0.5/bin/catalina.sh run
#ENTRYPOINT ["/mnt/opt/apache-tomcat-9.0.5/bin/catalina.sh", "run"]
Using the following approach to deploy on google cloud run.
docker tag miniimagesvideos gcr.io/serious-bearing-358305/miniimagesvideos
docker push gcr.io/serious-bearing-358305/miniimagesvideos
gcloud run deploy --image=gcr.io/serious-bearing-358305/miniimagesvideos --port=80 --region=asia-southeast2 --allow-unauthenticated platform=managed --command=/mnt/opt/apache-tomcat-9.0.5/bin/catalina.sh
I keep getting error mentioned in the subject line
- I looked at the logs and there is no additional information.
- As per the troubleshooting steps mentioned by Google document all the requirement seems to be ok. I am able to run my application successfully on Google cloud VM. The application is build on 64 bit.
- I have tried multiple options like using the --command, port, host parameter while trying to deploy.
- I have tried to use CMD, instead of ENTRYPOINT in dockerfile. However, the result remains the same. I have tried to invoke tomcat using startup.sh vs Catalina.sh. But the outcome remains the same.
- I have tried to deploy the application from GUI, but the same error comes up.
It seem container shuts down immediately while trying to deploy on Google Cloud run. Whereas, there is no issue while trying to run docker container on a Google VM. Is there any additional configuration required for Google cloud run. Why tomcat is not able to run on Google cloud run?