mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 08:17:37 +00:00
install: improve Docker installation for openSUSE
Editing systemd unit files to customize Docker for Kata may generate conflicts with what's specified in /etc/sysconfig/docker, so use that file directly. Also, libcgroup1 dependency is wrong for newer distros, and should be pulled automatically for older ones. Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
parent
b2c002415c
commit
72b296d319
@ -1,4 +1,4 @@
|
||||
# Install Docker for Kata Containers on openSUSE Leap/Tumbleweed
|
||||
# Install Docker for Kata Containers on openSUSE
|
||||
|
||||
> **Note:**
|
||||
>
|
||||
@ -14,24 +14,24 @@
|
||||
> If you wish to use a block based backend, see the options listed on https://github.com/kata-containers/documentation/issues/407.
|
||||
|
||||
```bash
|
||||
$ sudo zypper -n install libcgroup1
|
||||
$ sudo zypper -n install docker
|
||||
```
|
||||
|
||||
For more information on installing Docker please refer to the
|
||||
[Docker Guide](https://software.opensuse.org/package/docker).
|
||||
|
||||
2. Configure Docker to use Kata Containers by default with one of the following methods:
|
||||
2. Configure the Docker daemon to use Kata Containers by default, with one of the following methods:
|
||||
|
||||
1. systemd
|
||||
1. Specify the runtime options in `/etc/sysconfig/docker`:
|
||||
|
||||
```bash
|
||||
$ sudo mkdir -p /etc/systemd/system/docker.service.d/
|
||||
$ cat <<EOF | sudo tee /etc/systemd/system/docker.service.d/kata-containers.conf
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/dockerd -D --add-runtime kata-runtime=/usr/bin/kata-runtime --default-runtime=kata-runtime
|
||||
EOF
|
||||
$ DOCKER_SYSCONFIG=/etc/sysconfig/docker
|
||||
# Add kata-runtime to the list of available runtimes, if not already listed
|
||||
$ grep -qE "^ *DOCKER_OPTS=.+--add-runtime[= ] *kata-runtime" $DOCKER_SYSCONFIG || sudo -E sed -i -E "s|^( *DOCKER_OPTS=.+)\" *$|\1 --add-runtime kata-runtime=/usr/bin/kata-runtime\"|g" $DOCKER_SYSCONFIG
|
||||
# If a current default runtime is specified, overwrite it with kata-runtime
|
||||
$ sudo -E sed -i -E "s|^( *DOCKER_OPTS=.+--default-runtime[= ] *)[^ \"]+(.*\"$)|\1kata-runtime\2|g" $DOCKER_SYSCONFIG
|
||||
# Add kata-runtime as default runtime, if no default runtime is specified
|
||||
$ grep -qE "^ *DOCKER_OPTS=.+--default-runtime" $DOCKER_SYSCONFIG || sudo -E sed -i -E "s|^( *DOCKER_OPTS=.+)(\"$)|\1 --default-runtime=kata-runtime\2|g" $DOCKER_SYSCONFIG
|
||||
```
|
||||
|
||||
2. Docker `daemon.json`
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Install Kata Containers on openSUSE Leap/Tumbleweed
|
||||
# Install Kata Containers on openSUSE
|
||||
|
||||
1. Install the Kata Containers components with the following commands:
|
||||
|
||||
@ -18,6 +18,5 @@
|
||||
```
|
||||
|
||||
2. Decide which container manager to use and select the corresponding link that follows:
|
||||
|
||||
- [Docker](docker/opensuse-docker-install.md)
|
||||
- [Kubernetes](https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#run-kata-containers-with-kubernetes)
|
||||
- [Kubernetes](../Developer-Guide.md#run-kata-containers-with-kubernetes)
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Install Kata Containers on openSUSE Leap
|
||||
|
||||
Follow the instructions in the generic [openSUSE install guide](opensuse-installation-guide.md).
|
||||
1. Install Kata Containers on openSUSE by following the instructions in the
|
||||
[openSUSE install guide](opensuse-installation-guide.md).
|
||||
<!--
|
||||
You can ignore the content of this comment.
|
||||
(test code run by test-install-docs.sh to validate code blocks this document)
|
||||
@ -12,3 +13,7 @@ https://raw.githubusercontent.com/kata-containers/documentation/master/install/o
|
||||
Please download this file and run kata-doc-to-script.sh again."
|
||||
```
|
||||
-->
|
||||
|
||||
2. Decide which container manager to use and select the corresponding link that follows:
|
||||
- [Docker](docker/opensuse-leap-docker-install.md)
|
||||
- [Kubernetes](../Developer-Guide.md#run-kata-containers-with-kubernetes)
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Install Kata Containers on openSUSE Tumbleweed
|
||||
|
||||
Follow the instructions in the generic [openSUSE install guide](opensuse-installation-guide.md).
|
||||
1. Install Kata Containers on openSUSE by following the instructions in the
|
||||
[openSUSE install guide](opensuse-installation-guide.md).
|
||||
<!--
|
||||
You can ignore the content of this comment.
|
||||
(test code run by test-install-docs.sh to validate code blocks this document)
|
||||
@ -12,3 +13,7 @@ https://raw.githubusercontent.com/kata-containers/documentation/master/install/o
|
||||
Please download this file and run kata-doc-to-script.sh again."
|
||||
```
|
||||
-->
|
||||
|
||||
2. Decide which container manager to use and select the corresponding link that follows:
|
||||
- [Docker](docker/opensuse-tumbleweed-docker-install.md)
|
||||
- [Kubernetes](../Developer-Guide.md#run-kata-containers-with-kubernetes)
|
||||
|
Loading…
Reference in New Issue
Block a user