How to safely update docker on Ubuntu 15.04

March 22, 2016 970 views
Docker Ubuntu

My droplet uses Ubuntu 15.04 and docker.io 1.5.0. The highest version of docker.io 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?

  • 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 http://blog.thoward37.me/articles/where-are-docker-images-stored/ that seems to show that the docker image is stored in /var/lib/docker/

  • @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.

2 Answers

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 docker.io
wget -qO- https://get.docker.com/ | sh
service docker start
  • hey, thanks for the updates. i've updated my own personal notes in case i find myself poking around with docker containers in the future.

Have another answer? Share your knowledge.