github.com/boynux/docker@v1.11.0-rc4/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  # 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 binary
    89  
    90  You can download either the latest release binary or a specific version.
    91  After downloading a binary file, you must set the file's execute bit to run it.
    92  
    93  To set the file's execute bit on Linux and OS X:
    94  
    95      $ chmod +x docker
    96  
    97  To get the list of stable release version numbers from GitHub, view the
    98  `docker/docker` [releases page](https://github.com/docker/docker/releases).
    99  
   100  > **Note**
   101  >
   102  > 1) You can get the MD5 and SHA256 hashes by appending .md5 and .sha256 to the URLs respectively
   103  >
   104  > 2) You can get the compressed binaries by appending .tgz to the URLs
   105  
   106  ### Get the Linux binary
   107  
   108  To download the latest version for Linux, use the
   109  following URLs:
   110  
   111      https://get.docker.com/builds/Linux/i386/docker-latest
   112  
   113      https://get.docker.com/builds/Linux/x86_64/docker-latest
   114  
   115  To download a specific version for Linux, use the
   116  following URL patterns:
   117  
   118      https://get.docker.com/builds/Linux/i386/docker-<version>
   119  
   120      https://get.docker.com/builds/Linux/x86_64/docker-<version>
   121  
   122  For example:
   123  
   124      https://get.docker.com/builds/Linux/i386/docker-1.9.1
   125  
   126      https://get.docker.com/builds/Linux/x86_64/docker-1.9.1
   127  
   128  
   129  ### Get the Mac OS X binary
   130  
   131  The Mac OS X binary is only a client. You cannot use it to run the `docker`
   132  daemon. To download the latest version for Mac OS X, use the following URLs:
   133  
   134      https://get.docker.com/builds/Darwin/x86_64/docker-latest
   135  
   136  To download a specific version for Mac OS X, use the
   137  following URL patterns:
   138  
   139      https://get.docker.com/builds/Darwin/x86_64/docker-<version>
   140  
   141  For example:
   142  
   143      https://get.docker.com/builds/Darwin/x86_64/docker-1.9.1
   144  
   145  ### Get the Windows binary
   146  
   147  You can only download the Windows client binary for version `1.9.1` onwards.
   148  Moreover, the binary is only a client, you cannot use it to run the `docker` daemon.
   149  To download the latest version for Windows, use the following URLs:
   150  
   151      https://get.docker.com/builds/Windows/i386/docker-latest.exe
   152  
   153      https://get.docker.com/builds/Windows/x86_64/docker-latest.exe
   154  
   155  To download a specific version for Windows, use the following URL pattern:
   156  
   157      https://get.docker.com/builds/Windows/i386/docker-<version>.exe
   158  
   159      https://get.docker.com/builds/Windows/x86_64/docker-<version>.exe
   160  
   161  For example:
   162  
   163      https://get.docker.com/builds/Windows/i386/docker-1.9.1.exe
   164  
   165      https://get.docker.com/builds/Windows/x86_64/docker-1.9.1.exe
   166  
   167  
   168  ## Run the Docker daemon
   169  
   170      # start the docker in daemon mode from the directory you unpacked
   171      $ sudo ./docker daemon &
   172  
   173  ## Giving non-root access
   174  
   175  The `docker` daemon always runs as the root user, and the `docker`
   176  daemon binds to a Unix socket instead of a TCP port. By default that
   177  Unix socket is owned by the user *root*, and so, by default, you can
   178  access it with `sudo`.
   179  
   180  If you (or your Docker installer) create a Unix group called *docker*
   181  and add users to it, then the `docker` daemon will make the ownership of
   182  the Unix socket read/writable by the *docker* group when the daemon
   183  starts. The `docker` daemon must always run as the root user, but if you
   184  run the `docker` client as a user in the *docker* group then you don't
   185  need to add `sudo` to all the client commands.
   186  
   187  > **Warning**:
   188  > The *docker* group (or the group specified with `-G`) is root-equivalent;
   189  > see [*Docker Daemon Attack Surface*](../security/security.md#docker-daemon-attack-surface) details.
   190  
   191  ## Upgrades
   192  
   193  To upgrade your manual installation of Docker, first kill the docker
   194  daemon:
   195  
   196      $ killall docker
   197  
   198  Then follow the regular installation steps.
   199  
   200  ## Run your first container!
   201  
   202      # check your docker version
   203      $ sudo ./docker version
   204  
   205      # run a container and open an interactive shell in the container
   206      $ sudo ./docker run -i -t ubuntu /bin/bash
   207  
   208  Continue with the [User Guide](../userguide/index.md).