Merge pull request #764 from mstanleyjones/revamp_binary_install

Revamp the binary install guide
This commit is contained in:
Misty Stanley-Jones 2016-12-08 09:38:09 -08:00 committed by GitHub
commit 3f24caf640
1 changed files with 70 additions and 86 deletions

View File

@ -80,41 +80,62 @@ exhibit unexpected behaviour.
## Get the Docker Engine binaries ## Get the Docker Engine binaries
You can download either the latest release binaries or a specific version. To get You can download either the latest release binaries or a specific version. View
the list of stable release version numbers from GitHub, view the `docker/docker` the `docker/docker` [Releases page](https://github.com/docker/docker/releases).
[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
A group of download links is included at the bottom of the release notes for
each version of Docker. You can use these links to download the source code
archive for that release, binaries for supported platforms, and static binaries
for unsupported Linux platforms. Use the links listed in the Downloads section
to download the appropriate binaries.
### Get the Linux binaries ### Limitations of Windows and macOS binaries
To download the latest version for Linux, use the For Windows, the `i386` download contains a 32-bit client-only binary. The
following URLs: `x86_64` download contains both client and daemon binaries for 64-bit Windows
Server 2016 and Windows 10 systems.
https://get.docker.com/builds/Linux/i386/docker-latest.tgz The macOS binary only contains a client. You cannot use it to run the `dockerd`
daemon. If you need to run the daemon, install
[Docker for Mac](/docker-for-mac/index.md) instead.
https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz ### URL patterns for static binaries
To download a specific version for Linux, use the The URLs for released binaries are stable and follow a predictable pattern.
following URL patterns: Unfortunately, it is not possible to browse the releases in a directory
structure. If you do not want to get the links from the release notes for a
release, you can infer the URL for the binaries by using the following patterns:
https://get.docker.com/builds/Linux/i386/docker-<version>.tgz | Description | URL pattern |
|------------------------|-------------------------------------------------------------------|
| Latest Linux 64-bit | `https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz` |
| Latest Linux 32-bit | `https://get.docker.com/builds/Linux/i386/docker-latest.tgz` |
| Specific version Linux 64-bit| `https://get.docker.com/builds/Linux/x86_64/docker-<version>.tgz` |
| Specific version Linux 32-bit| `https://get.docker.com/builds/Linux/i386/docker-<version>.tgz` |
| Latest Windows 64-bit | `https://get.docker.com/builds/Windows/x86_64/docker-latest.zip` |
| Latest Windows 32-bit | `https://get.docker.com/builds/Windows/i386/docker-latest.zip` |
| Specific version Windows 64-bit | `https://get.docker.com/builds/Windows/x86_64/docker-<version>.zip` |
| Specific version Windows 32-bit | `https://get.docker.com/builds/Windows/i386/docker-<version>.zip` |
| Latest MacOS 64-bit | `https://get.docker.com/builds/Darwin/x86_64/docker-latest.tgz` |
| Specific version MacOS 64-bit | `https://get.docker.com/builds/Darwin/x86_64/docker-<version>.tgz` |
https://get.docker.com/builds/Linux/x86_64/docker-<version>.tgz For example, the stable URL for the Docker 1.11.0 64-bit static binary for Linux
is `https://get.docker.com/builds/Linux/x86_64/docker-1.11.0.tgz`.
For example:
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 > **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 > 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 > different. To install version 1.10 or below, follow the instructions in the
> <a href="https://docs.docker.com/v1.10/engine/installation/binaries/" target="_blank">1.10 documentation</a>. > [1.10 documentation](https://docs.docker.com/v1.10/engine/installation/binaries/){:target="_blank"}.
#### Verify downloaded files
#### Install the Linux binaries To verify the integrity of downloaded files, you can get an MD5 or SHA256
checksum by adding `.md5` or `.sha256` to the end of the URL. For instance,
to verify the `docker-1.11.0.tgz` link above, use the URL
`https://get.docker.com/builds/Linux/x86_64/docker-1.11.0.tgz.md5` or
`https://get.docker.com/builds/Linux/x86_64/docker-1.11.0.tgz.sha256`.
## Install the Linux binaries
After downloading, you extract the archive, which puts the binaries in a After downloading, you extract the archive, which puts the binaries in a
directory named `docker` in your current location. directory named `docker` in your current location.
@ -144,7 +165,7 @@ $ mv docker/* /usr/bin/
> in the same location. You can find the location of the current installation > in the same location. You can find the location of the current installation
> with `dirname $(which docker)`. > with `dirname $(which docker)`.
#### Run the Engine daemon on Linux ### Run the Engine daemon on Linux
You can manually start the Engine in daemon mode using: You can manually start the Engine in daemon mode using:
@ -161,84 +182,47 @@ For additional information about running the Engine in daemon mode, refer to
the [daemon command](../reference/commandline/dockerd.md) in the Engine command the [daemon command](../reference/commandline/dockerd.md) in the Engine command
line reference. line reference.
### Get the macOS binary ## Install the macOS binaries
The macOS binary is only a client. You cannot use it to run the `docker`
daemon. To download the latest version for macOS, use the following URLs:
https://get.docker.com/builds/Darwin/x86_64/docker-latest.tgz
To download a specific version for macOS, use the
following URL pattern:
https://get.docker.com/builds/Darwin/x86_64/docker-<version>.tgz
For example:
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 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 `.tgz` or on the command line, using `tar -xvzf docker-1.11.0.tgz`. You can run
binary can be executed from any location on your filesystem. the client binary from any location on your filesystem.
## Install the Windows binary
### Get the Windows binary You can extract the downloaded archive by double-clicking the downloaded
`.zip`. You can run the client binary from any location on your filesystem.
You can only download the Windows binary for version `1.9.1` onwards. ## Run client commands without root access
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.
To download the latest version for Windows, use the following URLs: On Linux, the `dockerd` daemon always runs as the root user and binds to a Unix
socket instead of a TCP port. By default that Unix socket is owned by the
`root` user. This means that by default, you need to use `sudo` to run `docker`
commands.
https://get.docker.com/builds/Windows/i386/docker-latest.zip If you (or your Docker installer) create a Unix group called `docker` and add
users to it, the `dockerd` daemon will change the ownership of the Unix socket
https://get.docker.com/builds/Windows/x86_64/docker-latest.zip to be readable and writable by members of the `docker` group when the daemon
starts. The `dockerd` daemon must always run as the root user, but you can run
To download a specific version for Windows, use the following URL pattern: `docker` client commands, such as `docker run`, as a non-privileged user.
https://get.docker.com/builds/Windows/i386/docker-<version>.zip
https://get.docker.com/builds/Windows/x86_64/docker-<version>.zip
For example:
https://get.docker.com/builds/Windows/i386/docker-1.11.0.zip
https://get.docker.com/builds/Windows/x86_64/docker-1.11.0.zip
> **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="https://docs.docker.com/v1.10/engine/installation/binaries/" target="_blank">1.10 documentation</a>.
## Giving non-root access
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.
> **Warning**: > **Warning**:
> The *docker* group (or the group specified with `-G`) is root-equivalent; > Membership in the *docker* group (or the group specified with `-G`) is equivalent
> see [*Docker Daemon Attack Surface*](../security/security.md#docker-daemon-attack-surface) details. > to `root` access. See
> [*Docker Daemon Attack Surface*](../security/security.md#docker-daemon-attack-surface) details.
## Upgrade Docker Engine ## Upgrade Docker Engine
To upgrade your manual installation of Docker Engine on Linux, first kill the docker Before you upgrade your manual installation of Docker Engine on Linux, first
daemon: stop the docker daemon:
$ killall docker ```bash
$ killall dockerd
```
Then follow the [regular installation steps](binaries.md#get-the-linux-binaries). After the Docker daemon stops, move the old binaries out of the way and follow
the [regular installation steps](binaries.md#get-the-linux-binaries).
## Next steps ## Next steps
Continue with the [User Guide](../userguide/index.md). Continue with the [User Guide](../userguide/index.md).