2015-06-07 23:07:20 -04:00
<!-- [metadata]>
+++
title = "Installation on openSUSE and SUSE Linux Enterprise"
description = "Installation instructions for Docker on openSUSE and on SUSE Linux Enterprise."
keywords = ["openSUSE, SUSE Linux Enterprise, SUSE, SLE, docker, documentation, installation"]
[menu.main]
parent = "smn_linux"
+++
<![end-metadata]-->
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
# openSUSE and SUSE Linux Enterprise
2014-04-15 20:53:12 -04:00
2015-12-13 11:00:39 -05:00
This page provides instructions for installing and configuring the latest
2015-08-05 04:35:52 -04:00
Docker Engine software on openSUSE and SUSE systems.
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
>**Note:** You can also find bleeding edge Docker versions inside of the repositories maintained by the [Virtualization:containers project ](https://build.opensuse.org/project/show/Virtualization:containers ) on the [Open Build Service ](https://build.opensuse.org/ ). This project delivers also other packages that are related with the Docker ecosystem (for example, Docker Compose).
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
## Prerequisites
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
You must be running a 64 bit architecture.
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
## openSUSE
2014-11-16 15:14:45 -05:00
2015-08-05 04:35:52 -04:00
Docker is part of the official openSUSE repositories starting from 13.2. No
additional repository is required on your system.
2014-11-16 15:14:45 -05:00
2015-08-05 04:35:52 -04:00
## SUSE Linux Enterprise
2014-11-16 15:14:45 -05:00
2015-08-05 04:35:52 -04:00
Docker is officially supported on SUSE Linux Enterprise 12 and later. You can find the latest supported Docker packages inside the `Container` module. To enable this module, do the following:
2014-11-16 15:14:45 -05:00
2015-08-05 04:35:52 -04:00
1. Start YaST, and select *Software > Software Repositories* .
2. Click *Add* to open the add-on dialog.
3. Select *Extensions and Module from Registration Server* and click *Next* .
4. From the list of available extensions and modules, select *Container Module* and click *Next* .
The containers module and its repositories are added to your system.
5. If you use Subscription Management Tool, update the list of repositories at the SMT server.
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
Otherwise execute the following command:
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
$ sudo SUSEConnect -p sle-module-containers/12/x86_64 -r ''
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
>**Note:** currently the `-r ''` flag is required to avoid a known limitation of `SUSEConnect` .
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
The [Virtualization:containers project ](https://build.opensuse.org/project/show/Virtualization:containers )
on the [Open Build Service ](https://build.opensuse.org/ ) contains also bleeding
edge Docker packages for SUSE Linux Enterprise. However these packages are
**not supported** by SUSE.
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
### Install Docker
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
1. Install the Docker package:
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
$ sudo zypper in docker
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
2. Start the Docker daemon.
2014-04-15 20:53:12 -04:00
2015-08-05 04:35:52 -04:00
$ sudo systemctl start docker
2014-06-25 09:36:14 -04:00
2015-08-05 04:35:52 -04:00
3. Test the Docker installation.
2014-08-07 09:41:23 -04:00
2015-08-05 04:35:52 -04:00
$ sudo docker run hello-world
2014-08-07 09:41:23 -04:00
2015-08-05 04:35:52 -04:00
## Configure Docker boot options
2014-08-07 09:41:23 -04:00
2015-08-05 04:35:52 -04:00
You can use these steps on openSUSE or SUSE Linux Enterprise. To start the `docker daemon` at boot, set the following:
2014-08-07 09:41:23 -04:00
2015-08-05 04:35:52 -04:00
$ sudo systemctl enable docker
The `docker` package creates a new group named `docker` . Users, other than
`root` user, must be part of this group to interact with the
Docker daemon. You can add users with this command syntax:
sudo /usr/sbin/usermod -a -G docker < username >
2014-06-25 09:36:14 -04:00
2015-08-05 04:35:52 -04:00
Once you add a user, make sure they relog to pick up these new permissions.
2014-06-25 09:36:14 -04:00
2015-08-05 04:35:52 -04:00
## Enable external network access
If you want your containers to be able to access the external network, you must
enable the `net.ipv4.ip_forward` rule. To do this, use YaST.
For openSUSE Tumbleweed and later, browse to the **System -> Network Settings -> Routing** menu. For SUSE Linux Enterprise 12 and previous openSUSE versions, browse to **Network Devices -> Network Settings -> Routing** menu (f) and check the *Enable IPv4 Forwarding* box.
When networking is handled by the Network Manager, instead of YaST you must edit
the `/etc/sysconfig/SuSEfirewall2` file needs by hand to ensure the `FW_ROUTE`
flag is set to `yes` like so:
FW_ROUTE="yes"
2014-05-21 17:05:19 -04:00
2014-11-25 23:09:52 -05:00
## Custom daemon options
If you need to add an HTTP Proxy, set a different directory or partition for the
2015-08-05 04:35:52 -04:00
Docker runtime files, or make other customizations, read the systemd article to
2015-10-09 19:50:41 -04:00
learn how to [customize your systemd Docker daemon options ](../articles/systemd.md ).
2014-11-25 23:09:52 -05:00
2015-04-29 15:51:57 -04:00
## Uninstallation
To uninstall the Docker package:
$ sudo zypper rm docker
2015-08-05 04:35:52 -04:00
The above command does not remove images, containers, volumes, or user created
2015-04-29 15:51:57 -04:00
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.
2015-08-05 04:35:52 -04:00
## Where to go from here
2014-11-25 23:09:52 -05:00
2015-10-22 02:59:16 -04:00
You can find more details about Docker on openSUSE or SUSE Linux Enterprise in the
[Docker quick start guide ](https://www.suse.com/documentation/sles-12/dockerquick/data/dockerquick.html )
on the SUSE website. The document targets SUSE Linux Enterprise, but its contents apply also to openSUSE.
2014-05-21 17:05:19 -04:00
2015-11-22 20:15:39 -05:00
Continue to the [User Guide ](../userguide/index.md ).