archlinux.rst 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. :title: Installation on Arch Linux
  2. :description: Docker installation on Arch Linux.
  3. :keywords: arch linux, virtualization, docker, documentation, installation
  4. .. _arch_linux:
  5. Arch Linux
  6. ==========
  7. .. include:: install_header.inc
  8. .. include:: install_unofficial.inc
  9. Installing on Arch Linux can be handled via the package in community:
  10. * `docker <https://www.archlinux.org/packages/community/x86_64/docker/>`_
  11. or the following AUR package:
  12. * `docker-git <https://aur.archlinux.org/packages/docker-git/>`_
  13. The docker package will install the latest tagged version of docker.
  14. The docker-git package will build from the current master branch.
  15. Dependencies
  16. ------------
  17. Docker depends on several packages which are specified as dependencies in
  18. the packages. The core dependencies are:
  19. * bridge-utils
  20. * device-mapper
  21. * iproute2
  22. * lxc
  23. * sqlite
  24. Installation
  25. ------------
  26. For the normal package a simple
  27. ::
  28. pacman -S docker
  29. is all that is needed.
  30. For the AUR package execute:
  31. ::
  32. yaourt -S docker-git
  33. The instructions here assume **yaourt** is installed. See
  34. `Arch User Repository <https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages>`_
  35. for information on building and installing packages from the AUR if you have not
  36. done so before.
  37. Starting Docker
  38. ---------------
  39. There is a systemd service unit created for docker. To start the docker service:
  40. ::
  41. sudo systemctl start docker
  42. To start on system boot:
  43. ::
  44. sudo systemctl enable docker
  45. Network Configuration
  46. ---------------------
  47. IPv4 packet forwarding is disabled by default on Arch, so internet access from inside
  48. the container may not work.
  49. To enable the forwarding, run as root on the host system:
  50. ::
  51. sysctl net.ipv4.ip_forward=1
  52. And, to make it persistent across reboots, enable it on the host's **/etc/sysctl.d/docker.conf**:
  53. ::
  54. net.ipv4.ip_forward=1