2.9 KiB
Arch Linux
Installing on Arch Linux can be handled via the package in community:
or the following AUR package:
The docker package will install the latest tagged version of docker. The docker-git package will build from the current master branch.
Dependencies
Docker depends on several packages which are specified as dependencies in the packages. The core dependencies are:
- bridge-utils
- device-mapper
- iproute2
- lxc
- sqlite
Installation
For the normal package a simple
$ sudo pacman -S docker
is all that is needed.
For the AUR package execute:
$ sudo yaourt -S docker-git
The instructions here assume yaourt is installed. See Arch User Repository for information on building and installing packages from the AUR if you have not done so before.
Starting Docker
There is a systemd service unit created for docker. To start the docker service:
$ sudo systemctl start docker
To start on system boot:
$ sudo systemctl enable docker
Custom daemon options
If you need to add an HTTP Proxy, set a different directory or partition for the Docker runtime files, or make other customizations, read our systemd article to learn how to customize your systemd Docker daemon options.
Uninstallation
To uninstall the Docker package:
$ sudo pacman -R docker
To uninstall the Docker package and dependencies that are no longer needed:
$ sudo pacman -Rns docker
The above commands will not remove images, containers, volumes, or user created configuration files on your host. If you wish to delete all images, containers, and volumes run the following command:
$ rm -rf /var/lib/docker
You must delete the user created configuration files manually.
Issues
systemd-network
Users of systemd-network >= v220 who have configured their network manually by
creating an <interface>.network file in /etc/systemd/network/ may have to add
the following line to make sure IP Forwarding is not disabled:
[Network]
...
IPForward=kernel
...
From systemd-network v220 onwards, the forwarding setting for a given network
defaults to off (instead of not being set). This prevents IP Forwarding to
happen, since docker only enables net.ipv4.conf.all.forwarding (which is
overriden by net.ipv4.conf.<interface>.forwarding being disabled)
Adding IPForward=kernel to the <interface>.network file prevents this
behavior, allowing IP Forwarding to function as expected.