github.com/portworx/docker@v1.12.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="https://docs.docker.com/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
   134  docker/docker-containerd
   135  docker/docker-containerd-ctr
   136  docker/docker-containerd-shim
   137  docker/docker-proxy
   138  docker/docker-runc
   139  docker/dockerd
   140  ```
   141  
   142  Engine requires these binaries to be installed in your host's `$PATH`.
   143  For example, to install the binaries in `/usr/bin`:
   144  
   145  ```bash
   146  $ mv docker/* /usr/bin/
   147  ```
   148  
   149  > **Note**: If you already have Engine installed on your host, make sure you
   150  > stop Engine before installing (`killall docker`), and install the binaries
   151  > in the same location. You can find the location of the current installation
   152  > with `dirname $(which docker)`.
   153  
   154  #### Run the Engine daemon on Linux
   155  
   156  You can manually start the Engine in daemon mode using:
   157  
   158  ```bash
   159  $ sudo dockerd &
   160  ```
   161  
   162  The GitHub repository provides samples of init-scripts you can use to control
   163  the daemon through a process manager, such as upstart or systemd. You can find
   164  these scripts in the <a href="https://github.com/docker/docker/tree/master/contrib/init">
   165  contrib directory</a>.
   166  
   167  For additional information about running the Engine in daemon mode, refer to
   168  the [daemon command](../reference/commandline/dockerd.md) in the Engine command
   169  line reference.
   170  
   171  ### Get the Mac OS X binary
   172  
   173  The Mac OS X binary is only a client. You cannot use it to run the `docker`
   174  daemon. To download the latest version for Mac OS X, use the following URLs:
   175  
   176      https://get.docker.com/builds/Darwin/x86_64/docker-latest.tgz
   177  
   178  To download a specific version for Mac OS X, use the
   179  following URL pattern:
   180  
   181      https://get.docker.com/builds/Darwin/x86_64/docker-<version>.tgz
   182  
   183  For example:
   184  
   185      https://get.docker.com/builds/Darwin/x86_64/docker-1.11.0.tgz
   186  
   187  You can extract the downloaded archive either by double-clicking the downloaded
   188  `.tgz` or on the command line, using `tar -xvzf docker-1.11.0.tgz`. The client
   189  binary can be executed from any location on your filesystem.
   190  
   191  
   192  ### Get the Windows binary
   193  
   194  You can only download the Windows binary for version `1.9.1` onwards.
   195  Moreover, the 32-bit (`i386`) binary is only a client, you cannot use it to
   196  run the `docker` daemon. The 64-bit binary (`x86_64`) is both a client and
   197  daemon.
   198  
   199  To download the latest version for Windows, use the following URLs:
   200  
   201      https://get.docker.com/builds/Windows/i386/docker-latest.zip
   202  
   203      https://get.docker.com/builds/Windows/x86_64/docker-latest.zip
   204  
   205  To download a specific version for Windows, use the following URL pattern:
   206  
   207      https://get.docker.com/builds/Windows/i386/docker-<version>.zip
   208  
   209      https://get.docker.com/builds/Windows/x86_64/docker-<version>.zip
   210  
   211  For example:
   212  
   213      https://get.docker.com/builds/Windows/i386/docker-1.11.0.zip
   214  
   215      https://get.docker.com/builds/Windows/x86_64/docker-1.11.0.zip
   216  
   217  
   218  > **Note** These instructions are for Engine 1.11 and up. Instructions for older
   219  > versions are slightly different. To install version 1.10 or below, follow the
   220  > instructions in the <a href="https://docs.docker.com/v1.10/engine/installation/binaries/" target="_blank">1.10 documentation</a>.
   221  
   222  ## Giving non-root access
   223  
   224  The `docker` daemon always runs as the root user, and the `docker`
   225  daemon binds to a Unix socket instead of a TCP port. By default that
   226  Unix socket is owned by the user *root*, and so, by default, you can
   227  access it with `sudo`.
   228  
   229  If you (or your Docker installer) create a Unix group called *docker*
   230  and add users to it, then the `docker` daemon will make the ownership of
   231  the Unix socket read/writable by the *docker* group when the daemon
   232  starts. The `docker` daemon must always run as the root user, but if you
   233  run the `docker` client as a user in the *docker* group then you don't
   234  need to add `sudo` to all the client commands.
   235  
   236  > **Warning**:
   237  > The *docker* group (or the group specified with `-G`) is root-equivalent;
   238  > see [*Docker Daemon Attack Surface*](../security/security.md#docker-daemon-attack-surface) details.
   239  
   240  ## Upgrade Docker Engine
   241  
   242  To upgrade your manual installation of Docker Engine on Linux, first kill the docker
   243  daemon:
   244  
   245      $ killall docker
   246  
   247  Then follow the [regular installation steps](#get-the-linux-binaries).
   248  
   249  ## Next steps
   250  
   251  Continue with the [User Guide](../userguide/index.md).