wpst1w
Last Updated: February 25, 2016
·
6.479K
· g33konaut
D38ff2119d6ace825b4c7b64e6f422d8

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:

#/bin/bash

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 github.com/dotcloud/docker
rm -rf $GOPATH/src/github.com/dotcloud/docker/vendor/src/code.google.com/p/go.net/ipv6

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

go install -v github.com/dotcloud/docker/

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 https://get.docker.io/builds/Linux/x86_64/docker-latest -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...

Say Thanks
Respond

6 Responses
Add your response

12439
Dcd5a1b7b0ed9323506ee6dbbc3b7f5a

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 ·
12456
D38ff2119d6ace825b4c7b64e6f422d8

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

over 1 year ago ·
12794
6bc51fe83a288b7fe7ab9ba87452b195

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 ·
12795
6bc51fe83a288b7fe7ab9ba87452b195

also the wget and chmod need sudo? #nitpick

over 1 year ago ·
12796
6bc51fe83a288b7fe7ab9ba87452b195

docker deamon and docker run also need sudo #nitpick

over 1 year ago ·
13172
6476a5743cde2023fd7e6e91883b4500

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: https://coderwall.com/p/wlhavw

over 1 year ago ·
Filed Under