2014-04-15 20:53:12 -04:00
|
|
|
page_title: Installation from Binaries
|
2014-05-27 13:08:19 -04:00
|
|
|
page_description: Instructions for installing Docker as a binary. Mostly meant for hackers who want to try out Docker on a variety of environments.
|
2014-04-15 20:53:12 -04:00
|
|
|
page_keywords: binaries, installation, docker, documentation, linux
|
|
|
|
|
|
|
|
# Binaries
|
|
|
|
|
|
|
|
**This instruction set is meant for hackers who want to try out Docker
|
|
|
|
on a variety of environments.**
|
|
|
|
|
|
|
|
Before following these directions, you should really check if a packaged
|
|
|
|
version of Docker is already available for your distribution. We have
|
|
|
|
packages for many distributions, and more keep showing up all the time!
|
|
|
|
|
|
|
|
## Check runtime dependencies
|
|
|
|
|
|
|
|
To run properly, docker needs the following software to be installed at
|
|
|
|
runtime:
|
|
|
|
|
2014-04-23 16:48:28 -04:00
|
|
|
- iptables version 1.4 or later
|
|
|
|
- Git version 1.7 or later
|
|
|
|
- procps (or similar provider of a "ps" executable)
|
|
|
|
- XZ Utils 4.9 or later
|
|
|
|
- a [properly mounted](
|
|
|
|
https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount)
|
|
|
|
cgroupfs hierarchy (having a single, all-encompassing "cgroup" mount
|
2014-07-24 18:19:50 -04:00
|
|
|
point [is](https://github.com/docker/docker/issues/2683)
|
|
|
|
[not](https://github.com/docker/docker/issues/3485)
|
|
|
|
[sufficient](https://github.com/docker/docker/issues/4568))
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
## Check kernel dependencies
|
|
|
|
|
|
|
|
Docker in daemon mode has specific kernel requirements. For details,
|
|
|
|
check your distribution in [*Installation*](../#installation-list).
|
|
|
|
|
2014-09-15 08:15:55 -04:00
|
|
|
In general, a 3.8 Linux kernel is the minimum requirement for Docker, as
|
|
|
|
some of the prior versions have known issues that are triggered by Docker.
|
|
|
|
Linux kernel versions older than 3.8 are known to cause kernel panics and
|
|
|
|
to break Docker.
|
|
|
|
|
|
|
|
The latest minor version (3.x.y) of the 3.10 (or a newer maintained version)
|
|
|
|
Linux kernel is recommended. Keeping the kernel up to date with the latest
|
|
|
|
minor version will ensure critical kernel bugs get fixed.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
Note that Docker also has a client mode, which can run on virtually any
|
2014-07-01 17:59:28 -04:00
|
|
|
Linux kernel (it even builds on OS X!).
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
## Get the docker binary:
|
|
|
|
|
2014-09-23 19:18:09 -04:00
|
|
|
$ wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O docker
|
2014-05-01 10:13:34 -04:00
|
|
|
$ chmod +x docker
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-04-18 16:21:55 -04:00
|
|
|
> **Note**:
|
|
|
|
> If you have trouble downloading the binary, you can also get the smaller
|
|
|
|
> compressed release file:
|
2014-09-23 19:18:09 -04:00
|
|
|
> [https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz](
|
|
|
|
> https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz)
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
## Run the docker daemon
|
|
|
|
|
|
|
|
# start the docker in daemon mode from the directory you unpacked
|
2014-05-01 10:13:34 -04:00
|
|
|
$ sudo ./docker -d &
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
## Giving non-root access
|
|
|
|
|
2014-05-21 17:05:19 -04:00
|
|
|
The `docker` daemon always runs as the root user, and the `docker`
|
|
|
|
daemon binds to a Unix socket instead of a TCP port. By default that
|
|
|
|
Unix socket is owned by the user *root*, and so, by default, you can
|
|
|
|
access it with `sudo`.
|
|
|
|
|
|
|
|
If you (or your Docker installer) create a Unix group called *docker*
|
|
|
|
and add users to it, then the `docker` daemon will make the ownership of
|
|
|
|
the Unix socket read/writable by the *docker* group when the daemon
|
|
|
|
starts. The `docker` daemon must always run as the root user, but if you
|
|
|
|
run the `docker` client as a user in the *docker* group then you don't
|
|
|
|
need to add `sudo` to all the client commands.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-04-18 16:21:55 -04:00
|
|
|
> **Warning**:
|
|
|
|
> The *docker* group (or the group specified with `-G`) is root-equivalent;
|
|
|
|
> see [*Docker Daemon Attack Surface*](
|
2014-04-24 08:12:21 -04:00
|
|
|
> /articles/security/#dockersecurity-daemon) details.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
## Upgrades
|
|
|
|
|
|
|
|
To upgrade your manual installation of Docker, first kill the docker
|
|
|
|
daemon:
|
|
|
|
|
2014-05-01 10:13:34 -04:00
|
|
|
$ killall docker
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
Then follow the regular installation steps.
|
|
|
|
|
|
|
|
## Run your first container!
|
|
|
|
|
|
|
|
# check your docker version
|
2014-05-01 10:13:34 -04:00
|
|
|
$ sudo ./docker version
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
# run a container and open an interactive shell in the container
|
2014-05-01 10:13:34 -04:00
|
|
|
$ sudo ./docker run -i -t ubuntu /bin/bash
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-21 17:05:19 -04:00
|
|
|
Continue with the [User Guide](/userguide/).
|