Tag : debian

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!

Policykit adventures

After installing Debian on a laptop this week, once again, I ran into the “problem” of not being able to shutdown or reboot the computer, when another user is logged in, for example via SSH. If you’re a Linux user, maybe you have seen it:

System policy prevents restarting the system when other users are logged in

The cause of this behaviour is something called policykit, and a policy defined in /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy. I found several pages on the web, that suggested to modify this file to change the policy. However, as this file is shipped by a package, and living below /usr/share, it is not intended to be modified by users to override the policies it contains.

The correct way to fix the problem is in something called PolicyKit Local Authority, or pklocalauthority. To enable all users to shutdown or reboot the computer, even when other users are logged in, create a file named /etc/polkit-1/localauthority/50-local.d/usershutdown.pkla (the name must end in .pkla) and put the following in it:

[Allow Shutdown] Identity=unix-user:*

[Allow Restart] Identity=unix-user:*

You may have to reboot the computer (or at least log out and back in) for the policy override to take effect.

VLC 0.9.8a on Debian Etch

The Sipo.nl debian repository now contains VLC version 0.9.8a for Etch, WITH x264 support. For now, it is only available for the amd64 architecture. To use it, you need the following lines in your sources.list:

deb http://debian.sipo.nl etch-custom main
deb http://debian.sipo.nl etch-backports main
deb http://www.backports.org/debian etch-backports main
deb http://www.debian-multimedia.org etch main

  • The first, ‘etch-custom’, contains VLC itself and a version of Ffmpeg (providing libavcodec and libavformat, among others) with libx264 support.
  • The second, ‘etch-backports’, contains some backported dependencies of VLC and Ffmpeg, like x264, dirac, pulseaudio, alsa-lib, etc.
  • The third, Backports.org, provides a recent version of libspeex1, a dependency of VLC.
  • The last, Christian Marillat’s multimedia repo, contains the remaining dependencies, like libxvidcore4, libfaad0, libfacc0, liblame0, etc.

The VLC packages are backported from the Debian experimental repository, where version 0.9.8a was uploaded on December 3rd, 2008. Support for libx264 was enabled, while support for libdca, libschroedinger, libass and libv4l were disabled, because I couldn’t find or build those libraries for Etch.

Ffmpeg is backported from Christian Marillat’s repository for Lenny, without any real changes, except disabling libschroedinger support. x264 was also taken from Christian Marillat’s Lenny repo, which provides a recent version from the x264 Git repository.

Installing VLC should be as simple as running aptitude -t etch-custom install vlc. When Apt is correctly configured, all dependencies should install automatically.

CAVEAT: Etch provides libshout3 version 2.2.2-1. My VLC packages¬†¬†probably DO NOT WORK with this version, although I haven’t tested it. In stead, you should probably install or upgrade libshout3 to version 2.2.2-5 from etch-backports at debian.sipo.nl.

All packages come without any guarantee. They work for me, please use at your own risk.

Debian Sarge -> Stable, revisited

Een tijdje geleden, in september 2004, na de aankondiging dat men naar een release van Debian Sarge aan het toewerken was, postte ik al een link naar het grafiekje van de release-critical bugs.

Aangezien men de wens heeft uitgesproken om Sarge eind deze maand toch te releasen, en het aantal bugs nu erg hard aan het dalen is, laat ik het grafiekje nog maar eens zien.


Bron: Release-critical bugs status @ Debian.org