How to pull and restart my custom docker image from dockerhub

Viewed 238

I have paid version of docker hub.

I started my dockerfile from docker hub by:

sudo docker pull myname/demo-test:latest
sudo docker run -d -p 4444:4444 myname/demo-test

And it is working fine.

A created new version (new latest tag) and now, I would like to pull and restart my container.

How can I do it?

I tryied:

sudo docker pull myname/demo-test:latest
sudo docker restart ID

... but still old version is running.

1 Answers

After pulling the latest tag again, stop the existing container. and execute the run command again.

sudo docker run -d -p 4444:4444 myname/demo-test
Related