How to safely update docker on Ubuntu 15.04

My droplet uses Ubuntu 15.04 and 1.5.0. The highest version of available is 1.6.2. I see various ways to update docker and am afraid to experiment for fear of losing my data container in the process. What is the best way to update to docker >= 1.7 and ensure containers are not lost?


@SphericalCow It’s common to use a data container for persistent data. I may need to backup the data container, but I’d like to avoid that if it is unnecessary in this process because the data is large.

not very well-versed on docker containers, but there is a backups feature from your DigitalOcean Control Panel. Looking at some of my mediocre Docker notes, however, my own understanding is that docker containers generally do not persist data, unless some application in the container writes to a separate volume from the container itself. If I read my notes correctly, the parameters of the container (mounts, port assignments, etc) is contained within the container image itself.

I was able to find that seems to show that the docker image is stored in /var/lib/docker/

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I went ahead and exported my data container to be safe before trying to solve this.

docker export my_data_container > my-backup.tar 

Here’s what I did to update:

service docker stop
apt-get remove
wget -qO- | sh
service docker start

This comment has been deleted