JackyJohnson
JackyJohnson

Reputation: 3126

How to spin up VM instance using new version of container image

I have an app with a Dockerfile that gets auto-built on Dockerhub when I push code to my repository. It is tagged with the latest tag. I would like then to reset my GCE VM instance to use that version.

I have reserved IP address for that VM, so I would like to be able to just replace the image and keep everything else the same.

It seems right now that I must create a new instance and I cannot tell it to pull the latest image again.

Upvotes: 0

Views: 95

Answers (1)

JackyJohnson
JackyJohnson

Reputation: 3126

I ended up setting up autobuild docker to apply a tag based on a git tag and then use gcloud command gcloud compute instances update-container --container-image=myImage instanceName.

Upvotes: 1

Related Questions