github.com/45cali/docker@v1.11.1/docs/installation/binaries.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "Installation from binaries"
     4  description = "Instructions for installing Docker as a binary. Mostly meant for hackers who want to try out Docker on a variety of environments."
     5  keywords = ["binaries, installation, docker, documentation,  linux"]
     6  [menu.main]
     7  parent = "engine_install"
     8  weight = 110
     9  +++
    10  <![end-metadata]-->
    11  
    12  # Installation from binaries
    13  
    14  **This instruction set is meant for hackers who want to try out Docker
    15  on a variety of environments.**
    16  
    17  Before following these directions, you should really check if a packaged
    18  version of Docker is already available for your distribution. We have
    19  packages for many distributions, and more keep showing up all the time!
    20  
    21  ## Check runtime dependencies
    22  
    23  To run properly, docker needs the following software to be installed at
    24  runtime:
    25  
    26   - iptables version 1.4 or later
    27   - Git version 1.7 or later
    28   - procps (or similar provider of a "ps" executable)
    29   - XZ Utils 4.9 or later
    30   - a [properly mounted](
    31     https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount)
    32     cgroupfs hierarchy (having a single, all-encompassing "cgroup" mount
    33     point [is](https://github.com/docker/docker/issues/2683)
    34     [not](https://github.com/docker/docker/issues/3485)
    35     [sufficient](https://github.com/docker/docker/issues/4568))
    36  
    37  ## Check kernel dependencies
    38  
    39  Docker in daemon mode has specific kernel requirements. For details,
    40  check your distribution in [*Installation*](index.md#on-linux).
    41  
    42  A 3.10 Linux kernel is the minimum requirement for Docker.
    43  Kernels older than 3.10 lack some of the features required to run Docker
    44  containers. These older versions are known to have bugs which cause data loss
    45  and frequently panic under certain conditions.
    46  
    47  The latest minor version (3.x.y) of the 3.10 (or a newer maintained version)
    48  Linux kernel is recommended. Keeping the kernel up to date with the latest
    49  minor version will ensure critical kernel bugs get fixed.
    50  
    51  > **Warning**:
    52  > Installing custom kernels and kernel packages is probably not
    53  > supported by your Linux distribution's vendor. Please make sure to
    54  > ask your vendor about Docker support first before attempting to
    55  > install custom kernels on your distribution.
    56  
    57  > **Warning**:
    58  > Installing a newer kernel might not be enough for some distributions
    59  > which provide packages which are too old or incompatible with
    60  > newer kernels.
    61  
    62  Note that Docker also has a client mode, which can run on virtually any
    63  Linux kernel (it even builds on OS X!).
    64  
    65  ## Enable AppArmor and SELinux when possible
    66  
    67  Please use AppArmor or SELinux if your Linux distribution supports
    68  either of the two. This helps improve security and blocks certain
    69  types of exploits. Your distribution's documentation should provide
    70  detailed steps on how to enable the recommended security mechanism.
    71  
    72  Some Linux distributions enable AppArmor or SELinux by default and
    73  they run a kernel which doesn't meet the minimum requirements (3.10
    74  or newer). Updating the kernel to 3.10 or newer on such a system
    75  might not be enough to start Docker and run containers.
    76  Incompatibilities between the version of AppArmor/SELinux user
    77  space utilities provided by the system and the kernel could prevent
    78  Docker from running, from starting containers or, cause containers to
    79  exhibit unexpected behaviour.
    80  
    81  > **Warning**:
    82  > If either of the security mechanisms is enabled, it should not be
    83  > disabled to make Docker or its containers run. This will reduce
    84  > security in that environment, lose support from the distribution's
    85  > vendor for the system, and might break regulations and security
    86  > policies in heavily regulated environments.
    87  
    88  ## Get the Docker Engine binaries
    89  
    90  You can download either the latest release binaries or a specific version. To get
    91  the list of stable release version numbers from GitHub, view the `docker/docker`
    92  [releases page](https://github.com/docker/docker/releases). You can get the MD5
    93  and SHA256 hashes by appending .md5 and .sha256 to the URLs respectively
    94  
    95  
    96  ### Get the Linux binaries
    97  
    98  To download the latest version for Linux, use the
    99  following URLs:
   100  
   101      https://get.docker.com/builds/Linux/i386/docker-latest.tgz
   102  
   103      https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz
   104  
   105  To download a specific version for Linux, use the
   106  following URL patterns:
   107  
   108      https://get.docker.com/builds/Linux/i386/docker-<version>.tgz
   109  
   110      https://get.docker.com/builds/Linux/x86_64/docker-<version>.tgz
   111  
   112  For example:
   113  
   114      https://get.docker.com/builds/Linux/i386/docker-1.11.0.tgz
   115  
   116      https://get.docker.com/builds/Linux/x86_64/docker-1.11.0.tgz
   117  
   118  > **Note** These instructions are for Docker Engine 1.11 and up. Engine 1.10 and
   119  > under consists of a single binary, and instructions for those versions are
   120  > different. To install version 1.10 or below, follow the instructions in the 
   121  > <a href="/v1.10/engine/installation/binaries/" target="_blank">1.10 documentation</a>.
   122  
   123  
   124  #### Install the Linux binaries
   125  
   126  After downloading, you extract the archive, which puts the binaries in a
   127  directory named `docker` in your current location.
   128  
   129  ```bash
   130  $ tar -xvzf docker-latest.tgz
   131  
   132  docker/
   133  docker/docker-containerd-ctr
   134  docker/docker
   135  docker/docker-containerd
   136  docker/docker-runc
   137  docker/docker-containerd-shim
   138  ```
   139  
   140  Engine requires these binaries to be installed in your host's `$PATH`.
   141  For example, to install the binaries in `/usr/bin`:
   142  
   143  ```bash
   144  $ mv docker/* /usr/bin/
   145  ```
   146  
   147  > **Note**: If you already have Engine installed on your host, make sure you
   148  > stop Engine before installing (`killall docker`), and install the binaries
   149  > in the same location. You can find the location of the current installation
   150  > with `dirname $(which docker)`.
   151  
   152  #### Run the Engine daemon on Linux
   153  
   154  You can manually start the Engine in daemon mode using:
   155  
   156  ```bash
   157  $ sudo docker daemon &
   158  ```
   159  
   160  The GitHub repository provides samples of init-scripts you can use to control
   161  the daemon through a process manager, such as upstart or systemd. You can find
   162  these scripts in the <a href="https://github.com/docker/docker/tree/master/contrib/init">
   163  contrib directory</a>.
   164  
   165  For additional information about running the Engine in daemon mode, refer to
   166  the [daemon command](../reference/commandline/daemon.md) in the Engine command
   167  line reference.
   168  
   169  ### Get the Mac OS X binary
   170  
   171  The Mac OS X binary is only a client. You cannot use it to run the `docker`
   172  daemon. To download the latest version for Mac OS X, use the following URLs:
   173  
   174      https://get.docker.com/builds/Darwin/x86_64/docker-latest.tgz
   175  
   176  To download a specific version for Mac OS X, use the
   177  following URL pattern:
   178  
   179      https://get.docker.com/builds/Darwin/x86_64/docker-<version>.tgz
   180  
   181  For example:
   182  
   183      https://get.docker.com/builds/Darwin/x86_64/docker-1.11.0.tgz
   184  
   185  You can extract the downloaded archive either by double-clicking the downloaded
   186  `.tgz` or on the command line, using `tar -xvzf docker-1.11.0.tgz`. The client
   187  binary can be executed from any location on your filesystem.
   188  
   189  
   190  ### Get the Windows binary
   191  
   192  You can only download the Windows binary for version `1.9.1` onwards.
   193  Moreover, the 32-bit (`i386`) binary is only a client, you cannot use it to
   194  run the `docker` daemon. The 64-bit binary (`x86_64`) is both a client and
   195  daemon.
   196  
   197  To download the latest version for Windows, use the following URLs:
   198  
   199      https://get.docker.com/builds/Windows/i386/docker-latest.zip
   200  
   201      https://get.docker.com/builds/Windows/x86_64/docker-latest.zip
   202  
   203  To download a specific version for Windows, use the following URL pattern:
   204  
   205      https://get.docker.com/builds/Windows/i386/docker-<version>.zip
   206  
   207      https://get.docker.com/builds/Windows/x86_64/docker-<version>.zip
   208  
   209  For example:
   210  
   211      https://get.docker.com/builds/Windows/i386/docker-1.11.0.zip
   212  
   213      https://get.docker.com/builds/Windows/x86_64/docker-1.11.0.zip
   214  
   215  
   216  > **Note** These instructions are for Engine 1.11 and up. Instructions for older
   217  > versions are slightly different. To install version 1.10 or below, follow the
   218  > instructions in the <a href="/v1.10/engine/installation/binaries/" target="_blank">1.10 documentation</a>.
   219  
   220  ## Giving non-root access
   221  
   222  The `docker` daemon always runs as the root user, and the `docker`
   223  daemon binds to a Unix socket instead of a TCP port. By default that
   224  Unix socket is owned by the user *root*, and so, by default, you can
   225  access it with `sudo`.
   226  
   227  If you (or your Docker installer) create a Unix group called *docker*
   228  and add users to it, then the `docker` daemon will make the ownership of
   229  the Unix socket read/writable by the *docker* group when the daemon
   230  starts. The `docker` daemon must always run as the root user, but if you
   231  run the `docker` client as a user in the *docker* group then you don't
   232  need to add `sudo` to all the client commands.
   233  
   234  > **Warning**:
   235  > The *docker* group (or the group specified with `-G`) is root-equivalent;
   236  > see [*Docker Daemon Attack Surface*](../security/security.md#docker-daemon-attack-surface) details.
   237  
   238  ## Upgrade Docker Engine
   239  
   240  To upgrade your manual installation of Docker Engine on Linux, first kill the docker
   241  daemon:
   242  
   243      $ killall docker
   244  
   245  Then follow the [regular installation steps](#get-the-linux-binaries).
   246  
   247  ## Next steps
   248  
   249  Continue with the [User Guide](../userguide/index.md).