binaries.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. - iproute2 version 3.5 or later (build after 2012-05-21), and
  20. specifically the "ip" utility
  21. - iptables version 1.4 or later
  22. - The LXC utility scripts (http://lxc.sourceforge.net) version 0.8 or later
  23. - Git version 1.7 or later
  24. - XZ Utils 4.9 or later
  25. Check kernel dependencies
  26. -------------------------
  27. Docker in daemon mode has specific kernel requirements. For details,
  28. check your distribution in :ref:`installation_list`.
  29. Note that Docker also has a client mode, which can run on virtually
  30. any linux kernel (it even builds on OSX!).
  31. Get the docker binary:
  32. ----------------------
  33. .. code-block:: bash
  34. wget https://get.docker.io/builds/Linux/x86_64/docker-latest -O docker
  35. chmod +x docker
  36. Run the docker daemon
  37. ---------------------
  38. .. code-block:: bash
  39. # start the docker in daemon mode from the directory you unpacked
  40. sudo ./docker -d &
  41. .. _dockergroup:
  42. Giving non-root access
  43. ----------------------
  44. The ``docker`` daemon always runs as the root user, and since Docker
  45. version 0.5.2, the ``docker`` daemon binds to a Unix socket instead of
  46. a TCP port. By default that Unix socket is owned by the user *root*,
  47. and so, by default, you can access it with ``sudo``.
  48. Starting in version 0.5.3, if you (or your Docker installer) create a
  49. Unix group called *docker* and add users to it, then the ``docker``
  50. daemon will make the ownership of the Unix socket read/writable by the
  51. *docker* group when the daemon starts. The ``docker`` daemon must
  52. always run as the root user, but if you run the ``docker`` client as a
  53. user in the *docker* group then you don't need to add ``sudo`` to all
  54. the client commands.
  55. .. warning:: The *docker* group is root-equivalent.
  56. Upgrades
  57. --------
  58. To upgrade your manual installation of Docker, first kill the docker
  59. daemon:
  60. .. code-block:: bash
  61. killall docker
  62. Then follow the regular installation steps.
  63. Run your first container!
  64. -------------------------
  65. .. code-block:: bash
  66. # check your docker version
  67. sudo ./docker version
  68. # run a container and open an interactive shell in the container
  69. sudo ./docker run -i -t ubuntu /bin/bash
  70. Continue with the :ref:`hello_world` example.