github.com/guilhermebr/docker@v1.4.2-0.20150428121140-67da055cebca/docs/sources/installation/debian.md (about) 1 page_title: Installation on Debian 2 page_description: Instructions for installing Docker on Debian. 3 page_keywords: Docker, Docker documentation, installation, debian 4 5 # Debian 6 7 Docker is supported on the following versions of Debian: 8 9 - [*Debian 8.0 Jessie (64-bit)*](#debian-jessie-80-64-bit) 10 - [*Debian 7.7 Wheezy (64-bit)*](#debian-wheezystable-7x-64-bit) 11 12 ## Debian Jessie 8.0 (64-bit) 13 14 Debian 8 comes with a 3.16.0 Linux kernel, the `docker.io` package can be found in the `jessie-backports` repository. Reasoning behind this can be found <a href="https://lists.debian.org/debian-release/2015/03/msg00685.html" target="_blank">here</a>. Instructions how to enable the backports repository can be found <a href="http://backports.debian.org/Instructions/" target="_blank">here</a>. 15 16 > **Note**: 17 > Debian contains a much older KDE3/GNOME2 package called ``docker``, so the 18 > package and the executable are called ``docker.io``. 19 20 ### Installation 21 22 Make sure you enabled the `jessie-backports` repository, as stated above. 23 24 To install the latest Debian package (may not be the latest Docker release): 25 26 $ sudo apt-get update 27 $ sudo apt-get install docker.io 28 29 To verify that everything has worked as expected: 30 31 $ sudo docker run --rm hello-world 32 33 This command downloads and runs the `hello-world` image in a container. When the 34 container runs, it prints an informational message. Then, it exits. 35 36 > **Note**: 37 > If you want to enable memory and swap accounting see 38 > [this](/installation/ubuntulinux/#memory-and-swap-accounting). 39 40 ## Debian Wheezy/Stable 7.x (64-bit) 41 42 Docker requires Kernel 3.8+, while Wheezy ships with Kernel 3.2 (for more details 43 on why 3.8 is required, see discussion on 44 [bug #407](https://github.com/docker/docker/issues/407)). 45 46 Fortunately, wheezy-backports currently has [Kernel 3.16 47 ](https://packages.debian.org/search?suite=wheezy-backports§ion=all&arch=any&searchon=names&keywords=linux-image-amd64), 48 which is officially supported by Docker. 49 50 ### Installation 51 52 1. Install Kernel from wheezy-backports 53 54 Add the following line to your `/etc/apt/sources.list` 55 56 `deb http://http.debian.net/debian wheezy-backports main` 57 58 then install the `linux-image-amd64` package (note the use of 59 `-t wheezy-backports`) 60 61 $ sudo apt-get update 62 $ sudo apt-get install -t wheezy-backports linux-image-amd64 63 64 2. Restart your system. This is necessary for Debian to use your new kernel. 65 66 3. Install Docker using the get.docker.com script: 67 68 `curl -sSL https://get.docker.com/ | sh` 69 70 >**Note**: If your company is behind a filtering proxy, you may find that the 71 >`apt-key` 72 >command fails for the Docker repo during installation. To work around this, 73 >add the key directly using the following: 74 > 75 > $ wget -qO- https://get.docker.com/gpg | sudo apt-key add - 76 77 ## Giving non-root access 78 79 The `docker` daemon always runs as the `root` user and the `docker` 80 daemon binds to a Unix socket instead of a TCP port. By default that 81 Unix socket is owned by the user `root`, and so, by default, you can 82 access it with `sudo`. 83 84 If you (or your Docker installer) create a Unix group called `docker` 85 and add users to it, then the `docker` daemon will make the ownership of 86 the Unix socket read/writable by the `docker` group when the daemon 87 starts. The `docker` daemon must always run as the root user, but if you 88 run the `docker` client as a user in the `docker` group then you don't 89 need to add `sudo` to all the client commands. From Docker 0.9.0 you can 90 use the `-G` flag to specify an alternative group. 91 92 > **Warning**: 93 > The `docker` group (or the group specified with the `-G` flag) is 94 > `root`-equivalent; see [*Docker Daemon Attack Surface*]( 95 > /articles/security/#docker-daemon-attack-surface) details. 96 97 **Example:** 98 99 # Add the docker group if it doesn't already exist. 100 $ sudo groupadd docker 101 102 # Add the connected user "${USER}" to the docker group. 103 # Change the user name to match your preferred user. 104 # You may have to logout and log back in again for 105 # this to take effect. 106 $ sudo gpasswd -a ${USER} docker 107 108 # Restart the Docker daemon. 109 $ sudo service docker restart 110 111 112 ## What next? 113 114 Continue with the [User Guide](/userguide/).