github.com/tompao/docker@v1.9.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 = "smn_engine"
     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*](../installation#installation-list).
    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.6.0
   125  
   126      https://get.docker.com/builds/Linux/x86_64/docker-1.6.0
   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/i386/docker-latest
   135      
   136      https://get.docker.com/builds/Darwin/x86_64/docker-latest
   137  
   138  To download a specific version for Mac OS X, use the
   139  following URL patterns:
   140  
   141      https://get.docker.com/builds/Darwin/i386/docker-<version>
   142      
   143      https://get.docker.com/builds/Darwin/x86_64/docker-<version>
   144  
   145  For example:
   146  
   147      https://get.docker.com/builds/Darwin/i386/docker-1.6.0
   148  
   149      https://get.docker.com/builds/Darwin/x86_64/docker-1.6.0
   150  
   151  ### Get the Windows binary
   152   
   153  You can only download the Windows client binary for version `1.6.0` onwards.
   154  Moreover, the binary is only a client, you cannot use it to run the `docker` daemon.
   155  To download the latest version for Windows, use the following URLs:
   156  
   157      https://get.docker.com/builds/Windows/i386/docker-latest.exe
   158      
   159      https://get.docker.com/builds/Windows/x86_64/docker-latest.exe
   160  
   161  To download a specific version for Windows, use the following URL pattern:
   162  
   163      https://get.docker.com/builds/Windows/i386/docker-<version>.exe
   164      
   165      https://get.docker.com/builds/Windows/x86_64/docker-<version>.exe
   166  
   167  For example:
   168  
   169      https://get.docker.com/builds/Windows/i386/docker-1.6.0.exe
   170  
   171      https://get.docker.com/builds/Windows/x86_64/docker-1.6.0.exe
   172  
   173  
   174  ## Run the Docker daemon
   175  
   176      # start the docker in daemon mode from the directory you unpacked
   177      $ sudo ./docker daemon &
   178  
   179  ## Giving non-root access
   180  
   181  The `docker` daemon always runs as the root user, and the `docker`
   182  daemon binds to a Unix socket instead of a TCP port. By default that
   183  Unix socket is owned by the user *root*, and so, by default, you can
   184  access it with `sudo`.
   185  
   186  If you (or your Docker installer) create a Unix group called *docker*
   187  and add users to it, then the `docker` daemon will make the ownership of
   188  the Unix socket read/writable by the *docker* group when the daemon
   189  starts. The `docker` daemon must always run as the root user, but if you
   190  run the `docker` client as a user in the *docker* group then you don't
   191  need to add `sudo` to all the client commands.
   192  
   193  > **Warning**: 
   194  > The *docker* group (or the group specified with `-G`) is root-equivalent;
   195  > see [*Docker Daemon Attack Surface*](../articles/security.md#docker-daemon-attack-surface) details.
   196  
   197  ## Upgrades
   198  
   199  To upgrade your manual installation of Docker, first kill the docker
   200  daemon:
   201  
   202      $ killall docker
   203  
   204  Then follow the regular installation steps.
   205  
   206  ## Run your first container!
   207  
   208      # check your docker version
   209      $ sudo ./docker version
   210  
   211      # run a container and open an interactive shell in the container
   212      $ sudo ./docker run -i -t ubuntu /bin/bash
   213  
   214  Continue with the [User Guide](../userguide).