June 23, 2015 11:37 am
Dockercon #2 is underway, version 1.7.0 of Docker was released at the end of last week, and lots of other new toys are being launched. Time for some upgrades.
I got used to Docker always restarting containers when the daemon restarted, which included upgrades, but that behaviour went away around version 1.3.0 with the introduction of the new –restart policies
Here’s a little script to automate upgrading and restarting the containers that were running:
#!/bin/bash datenow=$(date +%s) sudo docker ps > /tmp/docker."$datenow" sudo apt-get update && sudo apt-get install -y lxc-docker sudo docker start $(tail -n +2 /tmp/docker."$datenow" | cut -c1-12)
I also ran into some problems with Ubuntu VMs where I’d installed from the old docker.io repos that have now moved to docker.com.
I needed to changeĀ /etc/apt/sources.list.d/docker.list from:
deb http://get.docker.io/ubuntu docker main
to:
deb https://get.docker.com/ubuntu docker main
The switch to HTTPS also meant I needed to:
apt-get install apt-transport-https
Posted by Chris Swan
Categories: code, Docker, howto
Mobile Site | Full Site
Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.
[…] less than two months since I last wrote about Upgrading Docker, but things have changed […]
By Upgrading Docker Redux | Chris Swan's Weblog on August 13, 2015 at 2:17 pm