binaries.rst 2.9 KB

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