spzbwa
Last Updated: February 25, 2016
·
149
· atrus6

A valid way to update a production docker container?

I've been running a live server, and this is the way that I've been updating it as time passes

docker build -t web --no-cache=true .
docker stop web
docker rm web
docker run -d -t --name web -p 80:80 --link web_db:web_db web

It hasn't given me any problems, and works well for me. My biggest gripe is that I have to include --no-cache=true to get a fresh pull from git, but other than the lengthy rebuild process (and it's not even that long to be honest) everything works.