binaries.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. :title: Installation from Binaries
  2. :description: This instruction set is meant for hackers who want to try out Docker on a variety of environments.
  3. :keywords: binaries, installation, docker, documentation, linux
  4. .. _binaries:
  5. Binaries
  6. ========
  7. .. include:: install_header.inc
  8. **This instruction set is meant for hackers who want to try out Docker
  9. on a variety of environments.**
  10. Before following these directions, you should really check if a
  11. packaged version of Docker is already available for your distribution.
  12. We have packages for many distributions, and more keep showing up all
  13. the time!
  14. Check runtime dependencies
  15. --------------------------
  16. .. DOC COMMENT: this should be kept in sync with
  17. https://github.com/dotcloud/docker/blob/master/hack/PACKAGERS.md#runtime-dependencies
  18. To run properly, docker needs the following software to be installed at runtime:
  19. - iptables version 1.4 or later
  20. - Git version 1.7 or later
  21. - XZ Utils 4.9 or later
  22. - a `properly mounted
  23. <https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount>`_
  24. cgroupfs hierarchy (having a single, all-encompassing "cgroup" mount point `is
  25. <https://github.com/dotcloud/docker/issues/2683>`_ `not
  26. <https://github.com/dotcloud/docker/issues/3485>`_ `sufficient
  27. <https://github.com/dotcloud/docker/issues/4568>`_)
  28. Check kernel dependencies
  29. -------------------------
  30. Docker in daemon mode has specific kernel requirements. For details,
  31. check your distribution in :ref:`installation_list`.
  32. In general, a 3.8 Linux kernel (or higher) is preferred, as some of the
  33. prior versions have known issues that are triggered by Docker.
  34. Note that Docker also has a client mode, which can run on virtually
  35. any Linux kernel (it even builds on OSX!).
  36. Get the docker binary:
  37. ----------------------
  38. .. code-block:: bash
  39. wget https://get.docker.io/builds/Linux/x86_64/docker-latest -O docker
  40. chmod +x docker
  41. .. note::
  42. If you have trouble downloading the binary, you can also get the smaller
  43. compressed release file: https://get.docker.io/builds/Linux/x86_64/docker-latest.tgz
  44. Run the docker daemon
  45. ---------------------
  46. .. code-block:: bash
  47. # start the docker in daemon mode from the directory you unpacked
  48. sudo ./docker -d &
  49. .. _dockergroup:
  50. Giving non-root access
  51. ----------------------
  52. The ``docker`` daemon always runs as the root user, and since Docker
  53. version 0.5.2, the ``docker`` daemon binds to a Unix socket instead of
  54. a TCP port. By default that Unix socket is owned by the user *root*,
  55. and so, by default, you can access it with ``sudo``.
  56. Starting in version 0.5.3, if you (or your Docker installer) create a
  57. Unix group called *docker* and add users to it, then the ``docker``
  58. daemon will make the ownership of the Unix socket read/writable by the
  59. *docker* group when the daemon starts. The ``docker`` daemon must
  60. always run as the root user, but if you run the ``docker`` client as a
  61. user in the *docker* group then you don't need to add ``sudo`` to all
  62. the client commands.
  63. .. warning:: The *docker* group (or the group specified with ``-G``) is
  64. root-equivalent; see :ref:`dockersecurity_daemon` details.
  65. Upgrades
  66. --------
  67. To upgrade your manual installation of Docker, first kill the docker
  68. daemon:
  69. .. code-block:: bash
  70. killall docker
  71. Then follow the regular installation steps.
  72. Run your first container!
  73. -------------------------
  74. .. code-block:: bash
  75. # check your docker version
  76. sudo ./docker version
  77. # run a container and open an interactive shell in the container
  78. sudo ./docker run -i -t ubuntu /bin/bash
  79. Continue with the :ref:`hello_world` example.