Last Updated: March 05, 2020
· avgp

Docker 0.7 on Debian Wheezy without custom kernel

With Docker 0.7 the need for a special kernel version is finally gone and it becomes easy to setup on Debian, too.

After I tried this Gist and the install from binaries I was abled to put a small script together to get Docker running on Debian Wheezy painlessly:


echo "!!!!!!!!!!!!!!!!"
echo "This is highly experimental"
echo "It may damage your system or be malfunctioning"
echo "Use this at your own risk!"
echo "!!!!!!!!!!!!!!!!!"

sudo apt-get -y update
sudo apt-get -y install lxc wget bsdtar iptables curl golang git aufs-tools mercurial libdevmapper-dev

export GOPATH=~/usr/lib/go
export PATH=$GOPATH/bin:$PATH

mkdir -p "$GOPATH"

echo "================="
echo "GO GET docker..."
echo "================="
go get -v
rm -rf $GOPATH/src/

echo "================="
echo "GO INSTALL..."
echo "================="

go install -v

echo "================="
echo "Mounting..."
echo "================="

echo 'none /sys/fs/cgroup cgroup defaults 0 0' | sudo tee -a /etc/fstab
sudo mount /sys/fs/cgroup

echo "================="
echo "Properly installing docker from binaries..."
echo "================="
wget -O /usr/local/bin/docker
chmod +x /usr/local/bin/docker

echo "================="
echo "Starting Daemon..."
echo "================="

docker -d &

echo "================="
echo "RUN..."
echo "================="

docker run -i -t ubuntu /bin/bash

I hope this helps to get you going a bit faster on the road of adventures with Docker!
But keep in mind: This is a very shaky process and it may break for you...

6 Responses
Add your response

Thanks, trying to get this working today. Wouldn't a "sudo docker -d &" be required before actually trying to run the container at the end of this script?

over 1 year ago ·

Thank you @eddixon - you're right! I adjusted the code snippet above to reflect that

over 1 year ago ·

thank you this is massively useful. with the latest docker (as of today 2014-02-16) I had to manually install go 1.2 as wheezy contains an earlier go and docker now requires 1.2

also I had to adjust the package list for apt-get install: golang obviously not needed anymore now with above manual installation, but it now needed btrfs-tools and libsqlite3-dev or it wouldn't find some header files

also, could you provide a quick explanation as to what's happening here for the total docker noob ... it does seem as if the above first builds and installs docker from source but then downloads and installs a precompiled binary or does it? is this doing the same thing twice? #confused

over 1 year ago ·

also the wget and chmod need sudo? #nitpick

over 1 year ago ·

docker deamon and docker run also need sudo #nitpick

over 1 year ago ·

I followed this but as @dehubbed said, it wouldn't work with Docker 0.8 because of the dependency on go 1.2, and I'm not keen on using the Debian testing apt repository. So I went with a different route and it turns out that the Docker deb packages are compatible:

over 1 year ago ·