Installing OpenSUSE Leap in a Docker container - no clue how to perform that

Hi,
I tried to install OpenSUSE Leap 15.5 using the Docker image from dockerhub (opensuse/leap:15.5), but I failed miserably :c

First of all, am I right in assuming that there’s no documentation regarding opensuse Docker images whatsoever? I wasn’t able to find one, no GitHub repos, no websites, no other forums. Nothing.

Secondly, I tried inspecting the image in order to find env variables that need to be provided while creating the container, but the ones that I found are… a bit enigmatic and I cannot make any sense out of them.

Anybody tried to install OpenSUSE as a Docker container before and can help with that?

That is very precise, complete and technically correct description.

What makes you think there are some?

Yes, you usually need to learn tools you are using.

docker pull opensuse/leap
docker container run -it opensuse/leap

Thanks for your help.

In the end I managed to run the leap image using a simple docker-compose file.

In case someone needs this in the future:

version: '3'

services:
  opensuse-leap:
    image: opensuse/leap
    stdin_open: true
    tty: true

I run them in a detached mode:

docker compose up -d

And then I can attach to a container using its id:

docker attach <container_id>

To detach without stopping the container use escape sequence:

<Ctrl-p><Ctrl-q>

The only concern (or a concept that I fail to understand) is that this container version seems… a bit different (stripped down) from “normal” version, meaning:
There’s no yast in terminal, even no ip command, no nano, no vi, no hostname command etc. I could go on with this list, but I hope you get what I’m trying to say.

Am I correct in assuming that I need to install these tools manually?

Yes. That is the whole point of containers. To have minimal environment to run one task.

Yup, that much I know.

Is there any way to run a full version of suse in a container? Or do I need to just use regular VMs?

Distrobox will do basically what you’re asking.

If you want an interactive container that is basically “Leap in a container”

Define “full version”. You can install anything you want or miss.

tumbleweed:~ # docker pull opensuse/leap
Using default tag: latest
latest: Pulling from opensuse/leap
54c54ebc67a9: Pull complete
Digest: sha256:1cf79e78bb69f39fb2f78a7c2c7ebc4b64cf8d82eb1df76cd36767a595ada7a8
Status: Downloaded newer image for opensuse/leap:latest
docker.io/opensuse/leap:latest
tumbleweed:~ # docker run -it opensuse/leap
d7379887eecc:/ # zypper

Usage:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.