DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

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

Top comments (0)