github.com/guilhermebr/docker@v1.4.2-0.20150428121140-67da055cebca/docs/sources/installation/binaries.md (about)

     1  page_title: Installation from binaries
     2  page_description: Instructions for installing Docker as a binary. Mostly meant for hackers who want to try out Docker on a variety of environments.
     3  page_keywords: binaries, installation, docker, documentation, linux
     4  
     5  # Binaries
     6  
     7  **This instruction set is meant for hackers who want to try out Docker
     8  on a variety of environments.**
     9  
    10  Before following these directions, you should really check if a packaged
    11  version of Docker is already available for your distribution. We have
    12  packages for many distributions, and more keep showing up all the time!
    13  
    14  ## Check runtime dependencies
    15  
    16  To run properly, docker needs the following software to be installed at
    17  runtime:
    18  
    19   - iptables version 1.4 or later
    20   - Git version 1.7 or later
    21   - procps (or similar provider of a "ps" executable)
    22   - XZ Utils 4.9 or later
    23   - a [properly mounted](
    24     https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount)
    25     cgroupfs hierarchy (having a single, all-encompassing "cgroup" mount
    26     point [is](https://github.com/docker/docker/issues/2683)
    27     [not](https://github.com/docker/docker/issues/3485)
    28     [sufficient](https://github.com/docker/docker/issues/4568))
    29  
    30  ## Check kernel dependencies
    31  
    32  Docker in daemon mode has specific kernel requirements. For details,
    33  check your distribution in [*Installation*](../#installation-list).
    34  
    35  A 3.10 Linux kernel is the minimum requirement for Docker.
    36  Kernels older than 3.10 lack some of the features required to run Docker
    37  containers. These older versions are known to have bugs which cause data loss
    38  and frequently panic under certain conditions.
    39  
    40  The latest minor version (3.x.y) of the 3.10 (or a newer maintained version)
    41  Linux kernel is recommended. Keeping the kernel up to date with the latest
    42  minor version will ensure critical kernel bugs get fixed.
    43  
    44  > **Warning**:
    45  > Installing custom kernels and kernel packages is probably not
    46  > supported by your Linux distribution's vendor. Please make sure to
    47  > ask your vendor about Docker support first before attempting to
    48  > install custom kernels on your distribution.
    49  
    50  > **Warning**:
    51  > Installing a newer kernel might not be enough for some distributions
    52  > which provide packages which are too old or incompatible with
    53  > newer kernels.
    54  
    55  Note that Docker also has a client mode, which can run on virtually any
    56  Linux kernel (it even builds on OS X!).
    57  
    58  ## Enable AppArmor and SELinux when possible
    59  
    60  Please use AppArmor or SELinux if your Linux distribution supports
    61  either of the two. This helps improve security and blocks certain
    62  types of exploits. Your distribution's documentation should provide
    63  detailed steps on how to enable the recommended security mechanism.
    64  
    65  Some Linux distributions enable AppArmor or SELinux by default and
    66  they run a kernel which doesn't meet the minimum requirements (3.10
    67  or newer). Updating the kernel to 3.10 or newer on such a system
    68  might not be enough to start Docker and run containers.
    69  Incompatibilities between the version of AppArmor/SELinux user
    70  space utilities provided by the system and the kernel could prevent
    71  Docker from running, from starting containers or, cause containers to
    72  exhibit unexpected behaviour.
    73  
    74  > **Warning**:
    75  > If either of the security mechanisms is enabled, it should not be
    76  > disabled to make Docker or its containers run. This will reduce
    77  > security in that environment, lose support from the distribution's
    78  > vendor for the system, and might break regulations and security
    79  > policies in heavily regulated environments.
    80  
    81  ## Get the Docker binary
    82  
    83  You can download either the latest release binary or a specific version.
    84  After downloading a binary file, you must set the file's execute bit to run it.
    85  
    86  To set the file's execute bit on Linux and OS X:
    87  
    88      $ chmod +x docker
    89  
    90  To get the list of stable release version numbers from Github, view the
    91  `docker/docker` [releases page](https://github.com/docker/docker/releases). 
    92  
    93  > **Note**
    94  >
    95  > 1) You can get the MD5 and SHA256 hashes by appending .md5 and .sha256 to the URLs respectively
    96  >
    97  > 2) You can get the compressed binaries by appending .tgz to the URLs
    98  
    99  ### Get the Linux binary
   100  
   101  To download the latest version for Linux, use the
   102  following URLs:
   103  
   104      https://get.docker.com/builds/Linux/i386/docker-latest
   105      
   106      https://get.docker.com/builds/Linux/x86_64/docker-latest
   107  
   108  To download a specific version for Linux, use the
   109  following URL patterns:
   110  
   111      https://get.docker.com/builds/Linux/i386/docker-<version>
   112      
   113      https://get.docker.com/builds/Linux/x86_64/docker-<version>
   114  
   115  For example:
   116  
   117      https://get.docker.com/builds/Linux/i386/docker-1.6.0
   118  
   119      https://get.docker.com/builds/Linux/x86_64/docker-1.6.0
   120  
   121  
   122  ### Get the Mac OS X binary
   123  
   124  The Mac OS X binary is only a client. You cannot use it to run the `docker`
   125  daemon. To download the latest version for Mac OS X, use the following URLs:
   126  
   127      https://get.docker.com/builds/Darwin/i386/docker-latest
   128      
   129      https://get.docker.com/builds/Darwin/x86_64/docker-latest
   130  
   131  To download a specific version for Mac OS X, use the
   132  following URL patterns:
   133  
   134      https://get.docker.com/builds/Darwin/i386/docker-<version>
   135      
   136      https://get.docker.com/builds/Darwin/x86_64/docker-<version>
   137  
   138  For example:
   139  
   140      https://get.docker.com/builds/Darwin/i386/docker-1.6.0
   141  
   142      https://get.docker.com/builds/Darwin/x86_64/docker-1.6.0
   143  
   144  ### Get the Windows binary
   145   
   146  You can only download the Windows client binary for version `1.6.0` onwards.
   147  Moreover, the binary is only a client, you cannot use it to run the `docker` daemon.
   148  To download the latest version for Windows, use the following URLs:
   149  
   150      https://get.docker.com/builds/Windows/i386/docker-latest.exe
   151      
   152      https://get.docker.com/builds/Windows/x86_64/docker-latest.exe
   153  
   154  To download a specific version for Windows, use the following URL pattern:
   155  
   156      https://get.docker.com/builds/Windows/i386/docker-<version>.exe
   157      
   158      https://get.docker.com/builds/Windows/x86_64/docker-<version>.exe
   159  
   160  For example:
   161  
   162      https://get.docker.com/builds/Windows/i386/docker-1.6.0.exe
   163  
   164      https://get.docker.com/builds/Windows/x86_64/docker-1.6.0.exe
   165  
   166  
   167  ## Run the Docker daemon
   168  
   169      # start the docker in daemon mode from the directory you unpacked
   170      $ sudo ./docker -d &
   171  
   172  ## Giving non-root access
   173  
   174  The `docker` daemon always runs as the root user, and the `docker`
   175  daemon binds to a Unix socket instead of a TCP port. By default that
   176  Unix socket is owned by the user *root*, and so, by default, you can
   177  access it with `sudo`.
   178  
   179  If you (or your Docker installer) create a Unix group called *docker*
   180  and add users to it, then the `docker` daemon will make the ownership of
   181  the Unix socket read/writable by the *docker* group when the daemon
   182  starts. The `docker` daemon must always run as the root user, but if you
   183  run the `docker` client as a user in the *docker* group then you don't
   184  need to add `sudo` to all the client commands.
   185  
   186  > **Warning**: 
   187  > The *docker* group (or the group specified with `-G`) is root-equivalent;
   188  > see [*Docker Daemon Attack Surface*](
   189  > /articles/security/#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/).