Deploying Docker to Google Cloud Run is dead simple and transparent, with HTTPS already set up

patarapolw

Pacharapol Withayasakpunt

Posted on May 22, 2020

Deploying Docker to Google Cloud Run is dead simple and transparent, with HTTPS already set up

It is as simple as tagging the Docker with gcr.io/$PROJECT_ID/$CONTAINER_NAME.

I prefer to create .env with the following lines,

PROJECT_ID=
CONTAINER_NAME=
Enter fullscreen mode Exit fullscreen mode

Then, run source .env, or use Oh-My-Zsh with dotenv plugin. Then run,

docker build -t gcr.io/$PROJECT_ID/$CONTAINER_NAME .
docker push gcr.io/$PROJECT_ID/$CONTAINER_NAME
Enter fullscreen mode Exit fullscreen mode

With Domain Mapping (Beta), it is dead simple to use a custom domain.

However, today I try Google App Engine (for Nuxt). I find it not as transparent as GCR, but not really harder...

Also, not sure about the costs.

There is this diagram, though. -- https://cloud.google.com/serverless-options

serverless-options-guide

💖 💪 🙅 🚩
patarapolw
Pacharapol Withayasakpunt

Posted on May 22, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related