Docker
Tested on openSUSE
Recommended articles
Related articles
Installation
docker is the base package. For Docker Compose, get docker-compose (Tumbleweed only). Docker Compose v2 has a different command-line syntax than the older Docker Compose v1. For backwards compatibility with the legacy syntax, docker-compose-switch can be installed on Tumbleweed.
With YaST
- For installing the packages, start "YaST Software". Search for docker and choose to install the packages appropriate for the openSUSE flavor you're running.
- To automatically start the docker daemon during boot:
- Go to YaST Services Manager.
- Select the
dockerservice - Click "Start Mode" and select "On Boot".
- To apply your changes click "OK".
- Since Docker runs with special privileges by default, user accounts wishing to use Docker should join a special system group. To join the
dockergroup:- Start YaST User and Group Management.
- Select the user and click "Edit".
- On the "Details" tab, check
dockerunder "Additional Groups". - Then click "OK" twice.
- The change will go into effect after logging out.
With terminal
Install packages
To install the docker and docker-compose packages:
Enable, start, run Docker
To start the docker daemon during boot:
To join the docker group that is allowed to use the docker daemon:
Log in to the docker group:
Restart the docker daemon:
Verify docker is running:
This will pull down and run the, "Hello World" docker container from dockerhub:
Clean up and remove docker image we pulled down:
docker images
docker rmi -f IMAGE_IDWhere "IMAGE_ID" is the Id value of the "Hello World" container.
Adding buildx Support As Plugin Where It Is Not Included By Default
This concerns (e.g.) s390x. The following commands can all be executed in your home directory on your LinuxONE instance/machine. The steps outlined here can be used analogously for other docker plugins (provided that a binary for the architecture in question is actually available).
Perform the following steps (v0.6.1 should be treated like a placeholder, it just happened to be the current version at the time of this writing. An overview of all available releases can always be obtained by just browsing releases w/o any additional URL components; command output for .eg. wget has deliberately been omitted for the sake of brevity):
mkdir -p .docker/cli-plugins
wget https://github.com/docker/buildx/releases/download/v0.6.1/buildx-v0.6.1.linux-s390x
cp buildx-v0.6.1.linux-s390x .docker/cli-plugins/docker-buildx
chmod +x .docker/cli-plugins/docker-buildx
docker buildx versionUse Docker
If you followed the instructions your openSUSE is ready to make use of docker containers. Dive into the great docker documentation and have a lot of fun...