2015-06-07 23:07:20 -04:00
|
|
|
<!--[metadata]>
|
|
|
|
+++
|
|
|
|
title = "Installation from binaries"
|
|
|
|
description = "Instructions for installing Docker as a binary. Mostly meant for hackers who want to try out Docker on a variety of environments."
|
|
|
|
keywords = ["binaries, installation, docker, documentation, linux"]
|
|
|
|
[menu.main]
|
2016-01-23 23:36:40 -05:00
|
|
|
parent = "engine_install"
|
2015-06-07 23:07:20 -04:00
|
|
|
weight = 110
|
|
|
|
+++
|
|
|
|
<![end-metadata]-->
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
# Installation from binaries
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
**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,
|
2015-11-22 20:15:39 -05:00
|
|
|
check your distribution in [*Installation*](index.md#on-linux).
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-12-02 11:21:43 -05:00
|
|
|
A 3.10 Linux kernel is the minimum requirement for Docker.
|
|
|
|
Kernels older than 3.10 lack some of the features required to run Docker
|
|
|
|
containers. These older versions are known to have bugs which cause data loss
|
|
|
|
and frequently panic under certain conditions.
|
2014-09-15 08:15:55 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
2014-12-02 11:21:43 -05:00
|
|
|
> **Warning**:
|
2015-02-08 23:02:16 -05:00
|
|
|
> Installing custom kernels and kernel packages is probably not
|
2014-12-02 11:21:43 -05:00
|
|
|
> supported by your Linux distribution's vendor. Please make sure to
|
|
|
|
> ask your vendor about Docker support first before attempting to
|
|
|
|
> install custom kernels on your distribution.
|
|
|
|
|
|
|
|
> **Warning**:
|
|
|
|
> Installing a newer kernel might not be enough for some distributions
|
|
|
|
> which provide packages which are too old or incompatible with
|
|
|
|
> newer kernels.
|
|
|
|
|
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
|
|
|
|
2015-02-08 23:02:16 -05:00
|
|
|
## Enable AppArmor and SELinux when possible
|
|
|
|
|
|
|
|
Please use AppArmor or SELinux if your Linux distribution supports
|
|
|
|
either of the two. This helps improve security and blocks certain
|
|
|
|
types of exploits. Your distribution's documentation should provide
|
|
|
|
detailed steps on how to enable the recommended security mechanism.
|
2014-12-02 11:21:43 -05:00
|
|
|
|
|
|
|
Some Linux distributions enable AppArmor or SELinux by default and
|
|
|
|
they run a kernel which doesn't meet the minimum requirements (3.10
|
|
|
|
or newer). Updating the kernel to 3.10 or newer on such a system
|
|
|
|
might not be enough to start Docker and run containers.
|
|
|
|
Incompatibilities between the version of AppArmor/SELinux user
|
|
|
|
space utilities provided by the system and the kernel could prevent
|
2015-02-08 23:02:16 -05:00
|
|
|
Docker from running, from starting containers or, cause containers to
|
2014-12-02 11:21:43 -05:00
|
|
|
exhibit unexpected behaviour.
|
|
|
|
|
|
|
|
> **Warning**:
|
2015-02-08 23:02:16 -05:00
|
|
|
> If either of the security mechanisms is enabled, it should not be
|
2014-12-02 11:21:43 -05:00
|
|
|
> disabled to make Docker or its containers run. This will reduce
|
|
|
|
> security in that environment, lose support from the distribution's
|
2015-02-08 23:02:16 -05:00
|
|
|
> vendor for the system, and might break regulations and security
|
2014-12-02 11:21:43 -05:00
|
|
|
> policies in heavily regulated environments.
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
## Get the Docker Engine binaries
|
2015-04-18 16:14:44 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
You can download either the latest release binaries or a specific version. To get
|
|
|
|
the list of stable release version numbers from GitHub, view the `docker/docker`
|
|
|
|
[releases page](https://github.com/docker/docker/releases). You can get the MD5
|
|
|
|
and SHA256 hashes by appending .md5 and .sha256 to the URLs respectively
|
2015-04-18 16:14:44 -04:00
|
|
|
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
### Get the Linux binaries
|
2015-04-18 16:14:44 -04:00
|
|
|
|
|
|
|
To download the latest version for Linux, use the
|
|
|
|
following URLs:
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Linux/i386/docker-latest.tgz
|
2016-01-23 23:36:40 -05:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz
|
2015-04-18 16:14:44 -04:00
|
|
|
|
|
|
|
To download a specific version for Linux, use the
|
|
|
|
following URL patterns:
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Linux/i386/docker-<version>.tgz
|
2016-01-23 23:36:40 -05:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Linux/x86_64/docker-<version>.tgz
|
2015-04-18 16:14:44 -04:00
|
|
|
|
|
|
|
For example:
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Linux/i386/docker-1.11.0.tgz
|
|
|
|
|
|
|
|
https://get.docker.com/builds/Linux/x86_64/docker-1.11.0.tgz
|
|
|
|
|
|
|
|
> **Note** These instructions are for Docker Engine 1.11 and up. Engine 1.10 and
|
|
|
|
> under consists of a single binary, and instructions for those versions are
|
|
|
|
> different. To install version 1.10 or below, follow the instructions in the
|
|
|
|
> <a href="/v1.10/engine/installation/binaries/" target="_blank">1.10 documentation</a>.
|
|
|
|
|
|
|
|
|
|
|
|
#### Install the Linux binaries
|
|
|
|
|
|
|
|
After downloading, you extract the archive, which puts the binaries in a
|
|
|
|
directory named `docker` in your current location.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ tar -xvzf docker-latest.tgz
|
|
|
|
|
|
|
|
docker/
|
|
|
|
docker/docker-containerd-ctr
|
|
|
|
docker/docker
|
|
|
|
docker/docker-containerd
|
|
|
|
docker/docker-runc
|
|
|
|
docker/docker-containerd-shim
|
|
|
|
```
|
|
|
|
|
|
|
|
Engine requires these binaries to be installed in your host's `$PATH`.
|
|
|
|
For example, to install the binaries in `/usr/bin`:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ mv docker/* /usr/bin/
|
|
|
|
```
|
2015-04-18 16:14:44 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
> **Note**: If you already have Engine installed on your host, make sure you
|
|
|
|
> stop Engine before installing (`killall docker`), and install the binaries
|
|
|
|
> in the same location. You can find the location of the current installation
|
|
|
|
> with `dirname $(which docker)`.
|
2015-04-18 16:14:44 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
#### Run the Engine daemon on Linux
|
|
|
|
|
|
|
|
You can manually start the Engine in daemon mode using:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ sudo docker daemon &
|
|
|
|
```
|
|
|
|
|
|
|
|
The GitHub repository provides samples of init-scripts you can use to control
|
|
|
|
the daemon through a process manager, such as upstart or systemd. You can find
|
|
|
|
these scripts in the <a href="https://github.com/docker/docker/tree/master/contrib/init">
|
|
|
|
contrib directory</a>.
|
|
|
|
|
|
|
|
For additional information about running the Engine in daemon mode, refer to
|
2016-04-28 02:55:22 -04:00
|
|
|
the [daemon command](../reference/commandline/dockerd.md) in the Engine command
|
2016-04-13 08:01:25 -04:00
|
|
|
line reference.
|
2015-04-18 16:14:44 -04:00
|
|
|
|
|
|
|
### Get the Mac OS X binary
|
|
|
|
|
|
|
|
The Mac OS X binary is only a client. You cannot use it to run the `docker`
|
|
|
|
daemon. To download the latest version for Mac OS X, use the following URLs:
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Darwin/x86_64/docker-latest.tgz
|
2015-04-18 16:14:44 -04:00
|
|
|
|
|
|
|
To download a specific version for Mac OS X, use the
|
2016-04-13 08:01:25 -04:00
|
|
|
following URL pattern:
|
2015-04-18 16:14:44 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Darwin/x86_64/docker-<version>.tgz
|
2015-04-18 16:14:44 -04:00
|
|
|
|
|
|
|
For example:
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Darwin/x86_64/docker-1.11.0.tgz
|
|
|
|
|
|
|
|
You can extract the downloaded archive either by double-clicking the downloaded
|
|
|
|
`.tgz` or on the command line, using `tar -xvzf docker-1.11.0.tgz`. The client
|
|
|
|
binary can be executed from any location on your filesystem.
|
|
|
|
|
2015-04-18 16:14:44 -04:00
|
|
|
|
2015-04-21 11:50:09 -04:00
|
|
|
### Get the Windows binary
|
2016-01-23 23:36:40 -05:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
You can only download the Windows binary for version `1.9.1` onwards.
|
|
|
|
Moreover, the 32-bit (`i386`) binary is only a client, you cannot use it to
|
|
|
|
run the `docker` daemon. The 64-bit binary (`x86_64`) is both a client and
|
|
|
|
daemon.
|
|
|
|
|
2015-04-18 16:14:44 -04:00
|
|
|
To download the latest version for Windows, use the following URLs:
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Windows/i386/docker-latest.zip
|
2016-01-23 23:36:40 -05:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Windows/x86_64/docker-latest.zip
|
2015-04-18 16:14:44 -04:00
|
|
|
|
|
|
|
To download a specific version for Windows, use the following URL pattern:
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Windows/i386/docker-<version>.zip
|
2016-01-23 23:36:40 -05:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Windows/x86_64/docker-<version>.zip
|
2015-04-18 16:14:44 -04:00
|
|
|
|
|
|
|
For example:
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Windows/i386/docker-1.11.0.zip
|
2015-04-18 16:14:44 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
https://get.docker.com/builds/Windows/x86_64/docker-1.11.0.zip
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
> **Note** These instructions are for Engine 1.11 and up. Instructions for older
|
|
|
|
> versions are slightly different. To install version 1.10 or below, follow the
|
|
|
|
> instructions in the <a href="/v1.10/engine/installation/binaries/" target="_blank">1.10 documentation</a>.
|
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
|
|
|
|
2016-01-23 23:36:40 -05:00
|
|
|
> **Warning**:
|
2014-04-18 16:21:55 -04:00
|
|
|
> The *docker* group (or the group specified with `-G`) is root-equivalent;
|
2015-11-14 21:01:24 -05:00
|
|
|
> see [*Docker Daemon Attack Surface*](../security/security.md#docker-daemon-attack-surface) details.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
## Upgrade Docker Engine
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
To upgrade your manual installation of Docker Engine on Linux, first kill the docker
|
2014-04-15 20:53:12 -04:00
|
|
|
daemon:
|
|
|
|
|
2014-05-01 10:13:34 -04:00
|
|
|
$ killall docker
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
Then follow the [regular installation steps](#get-the-linux-binaries).
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2016-04-13 08:01:25 -04:00
|
|
|
## Next steps
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2015-11-22 20:15:39 -05:00
|
|
|
Continue with the [User Guide](../userguide/index.md).
|