Tag : ubuntu

Docker on Debian Wheezy

Maybe you have already heard of the next revolution in application deployment called Docker. I quote:

Docker is an open-source engine which automates the deployment of applications as highly portable, self-sufficient containers which are independent of hardware, language, framework, packaging system and hosting provider.

On the getting started page, you can see that you need an Ubuntu machine to get it running:


  • Ubuntu 12.04 (LTS) (64-bit)
  • or Ubuntu 12.10 (quantal) (64-bit)
  • The 3.8 Linux Kernel

One thing that is missing from this list, is AUFS support in the kernel, which isn’t a sure thing these days in Ubuntu.

However, I was interested in running Docker on a 64-bit Debian Wheezy machine, and this post explains how to do it. It’s not really hard, but you need to install an Ubuntu kernel. At least, I haven’t been able to find a 3.8 kernel for Wheezy just yet.

Your best bet is the 3.8 kernel from Ubuntu 13.04 Raring, backported for Ubuntu 12.04 LTS Precise. If that link is broken, try this one or get the right page from here. I have tried a kernel from Ubuntu’s mainline kernel PPA, but the 3.8 and 3.9 kernels for Raring from there seem to lack AUFS support.

I downloaded the deb named linux-image-3.8.0-23-generic_3.8.0-23.34~precise1_amd64.deb, which installs on Wheezy without problems. Just do:

$ sudo dpkg -i linux-image-3.8.0-23-generic_3.8.0-23.34~precise1_amd64.deb
$ sudo reboot

Now find a Docker package on Launchpad. Get the one that is built for Precise.

First install the dependencies:

$ sudo apt-get install lxc bsdtar

and then Docker. This will not succeed:

$ sudo dpkg -i lxc-docker_0.4.0-1_amd64.deb
Selecting previously unselected package lxc-docker.
(Reading database ... 40929 files and directories currently installed.)
Unpacking lxc-docker (from lxc-docker_0.4.0-1_amd64.deb) ...
Setting up lxc-docker (0.4.0-1) ...
/var/lib/dpkg/info/lxc-docker.postinst: 4: /var/lib/dpkg/info/lxc-docker.postinst: /sbin/start: not found
dpkg: error processing lxc-docker (--install):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:

This is caused by Docker’s Ubuntu package trying to use upstart to start the daemon, which does not work on Debian. Disable that:

sed -i 's~/sbin/start~#/sbin/start~' /var/lib/dpkg/info/lxc-docker.postinst
sed -i 's~/sbin/stop~#/sbin/stop~' /var/lib/dpkg/info/lxc-docker.prerm

If you now have apt-get fix its state, it should work:

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up lxc-docker (0.4.0-1) ...

That’s it!

Now continue with the examples on Docker’s website. Happy Docker’ing!

Digikam 2.5 on Ubuntu Natty

Ubuntu Natty Narwhal (11.04) is almost a year old, but if you, like me, are not brave enough to upgrade to Oneiric, sometimes you find yourself forced to use outdated software. Fortunately, for many programs, backports from newer Ubuntu releases are available. Today, I am trying to install DigiKam 2.5.

A DigiKam backport is available from Philip Johnsson’s kubuntu-backports PPA. However, it is built for KDE 4.7, while Natty’s KDE is still at 4.6. So, we upgrade, using the Kubuntu Backports PPA. Now we’re almost there, except for some dependencies of DigiKam, that are not available in either PPA. These can be found in Philip Johnssons ‘extra’ PPA, but we have to be careful, because this PPA contains a lot of packages, and we surely do not want to upgrade all of those.

So, here we go. First, add the necessary PPAs:

sudo apt-add-repository ppa:kubuntu-ppa/backports
sudo apt-add-repository ppa:philip5/kubuntu-backports
sudo apt-add-repository ppa:philip5/extra

Then, make sure we don’t upgrade to packages from philip5/extra by default. Add the following to /etc/apt/preferences:

Package: *
Pin: release o=LP-PPA-philip5-extra
Pin-Priority: 1

Now you can just upgrade your system:

sudo apt-get update && sudo apt-get dist-upgrade

or use aptitude so review what will happen before you go ahead.