Skip to content

Deploy docker to gcp

How to auth:

gcloud auth login
gcloud auth configure-docker

Config has been stored here: /Users/rohit/.docker/config.json
Delete this if docker causes issues*.

How to login:

gcloud beta compute ssh --zone "us-central1-a" "instance-1" --project "silent-thunder-276920”
Password: rohit

How to build:

docker build --tag image:tag .
docker tag image:tag
docker push

How to create a service and deploy

docker service create --env MONGODB_URL=mongodb:// \
--env AUTOTHROTTLE_TARGET_CONCURRENCY=2.0 --name crawlerslow \