Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Docker latest on Ubuntu 14.04 with AUFS as the storage driver
#!/bin/bash
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get -y install lxc-docker
@yenki

This comment has been minimized.

Copy link

@yenki yenki commented May 22, 2015

Wow, thanks! I just added that to my bamboo startup script and it worked. This fixed the devicemapper issues on ubuntu 14.04

@victorliun

This comment has been minimized.

Copy link

@victorliun victorliun commented May 28, 2015

For ones want to remove docker first

!/bin/bash

sudo service docker stop
sudo apt-get remove lxc-docker
sudo apt-get autoremove
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get -y install lxc-docker

@wdullaer

This comment has been minimized.

Copy link

@wdullaer wdullaer commented Jul 2, 2015

Cheers man!
I lost two days trying to figure out why docker was not using the aufs driver and hence eating all my disk space.

@573

This comment has been minimized.

Copy link

@573 573 commented Jul 15, 2015

Thanx! In my debootstrapped machine I used based on that:

sudo service docker stop
sudo apt-get remove lxc-docker
sudo apt-get autoremove
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r) wget
sudo sh -c "wget -qO- http://get.docker.io/ubuntu/ | sh"
@behemphi

This comment has been minimized.

Copy link

@behemphi behemphi commented Aug 12, 2015

I had to blow away /var/lib/docker before changing over:

#!/bin/bash
sudo rm -rf /var/lib/docker
sudo service docker stop
sudo apt-get remove lxc-docker
sudo apt-get autoremove
which docker # just checking
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get -y install lxc-docker
@BrianHoldsworth

This comment has been minimized.

Copy link

@BrianHoldsworth BrianHoldsworth commented Sep 9, 2015

Thanks for helping rid my Ubuntu of the devicemapper scourge!

One caveat: If you already ran the docker service with the devicemapper storage driver, docker will continue to use it until you:

sudo service docker stop
sudo rm -fr /var/lib/docker #This will blow away any existing images!!!
sudo service docker start
@dannykansas

This comment has been minimized.

Copy link

@dannykansas dannykansas commented Jan 13, 2016

I have a data container that I would like to save (as the import process is tedious/several hours). Is there a good way to backup a data container prior to blowing away the /var/lib/docker directory?

@dandv

This comment has been minimized.

Copy link

@dandv dandv commented Feb 19, 2016

root@localhost:~# apt-get -y install linux-image-extra-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-extra-4.4.0-x86_64-linode63
E: Couldn't find any package by regex 'linux-image-extra-4.4.0-x86_64-linode63'
@wheezer256

This comment has been minimized.

Copy link

@wheezer256 wheezer256 commented Feb 19, 2016

dandv that isn't a generic kernel - you'll need to switch to a generic kernel first
try
apt-get install linux-image-extra-virtual

you'll probably need to have a look at what files you've got in /etc/grub.d as well - probably linode is inserting their custom kernel as a config into your grub.cfg - then updatedb and reboot

@chipwilson

This comment has been minimized.

Copy link

@chipwilson chipwilson commented Jun 3, 2016

A solution I manage has 19 Ubuntu 14.04 VMs running Docker 1.11. Yesterday I discovered that all but 2 of these VMs were using AUFS -- the other 2 were using devicemapper. I have no idea how that happened.

Borrowing heavily from the other answers here, this worked for me to switch these 2 VMs from devicemapper to AUFS without uninstalling Docker:

sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r)
sudo service docker stop
sudo rm -rf /var/lib/docker
sudo reboot
@jedwards1211

This comment has been minimized.

Copy link

@jedwards1211 jedwards1211 commented Oct 17, 2016

What is this lxc-docker package and how does it differ from the docker-engine package?

@toddlers

This comment has been minimized.

Copy link

@toddlers toddlers commented Nov 1, 2017

@jedwards1211 you can find a nice description for the same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment