Install or upgrade to docker 1.8.x on ubuntu 15.04

Ubuntu 15.04 repositories only contain docker 1.5, therefore, this is the version you get if you apt-get install docker on ubuntu.
If you need (and you should) latest version of docker (here 1.8.3), these are the steps you need to perform (as root):

Update the apt-get source

 vi /etc/apt/sources.list
 #Append this line:  
 deb https://apt.dockerproject.org/repo ubuntu-vivid main

Then type this at command prompt

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

install/upgrade docker

apt-get update
apt-get install docker-engine

Note: If you are upgrading, accept all default options (for configuration override) when prompted.

configure docker
For some reason, the file /etc/default/docker which used to contain the docker options is not read anymore. You can add docker option by editing the file /lib/systemd/system/docker.service and add the options at the end of the line

ExecStart=/usr/bin/docker daemon -H fd://

For instance, mine looks like this

/usr/bin/docker daemon -H fd:// --insecure-registry my.private.domain:5000 -g /docker

Restart the docker service

   systemctl daemon-reload
   service docker stop
   service docker start

Resources:

https://blog.docker.com/2015/07/new-apt-and-yum-repos/

http://nknu.net/how-to-configure-docker-on-ubuntu-15-04

Advertisements
This entry was posted in docker. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s