Skip to content

Divide Dockerfile to various containers in selkies-vdi #161

@maxpain

Description

@maxpain

Hello.

https://github.com/selkies-project/selkies-gstreamer/blob/main/addons/example/Dockerfile

At the moment, we have a very complex Dockerfile with every service in one container and have to use supervisor:

  • nginx
  • selkies-gstreamer
  • pipewire
  • wireplumber
  • pipewire-pulse
  • dbus
  • Xvfb
  • xfce

It would be better to decompose it into separate tiny images and provide unified and modular docker-compose and Kubernetes manifests with individual containers for each component. This would be easier to use, so we wouldn't need to build our own docker images; we can just use official images instead.

In my case, I use Xorg instead of Xvfb and run it in a different DaemonSet, and every service which depends on it looks like that:

# Wait for X11 to start
echo "Waiting for X display to be ready..."
while ! xdpyinfo > /dev/null 2>&1; do sleep 1; done
echo "X display is ready"

# Now start the needed component

It'll give us the flexibility to choose the desktop environment, X server (Xorg vs Xvfb)
Also, you can get rid of docker-nvidia-egl-desktop and docker-nvidia-glx-desktop and the need to copy-paste many configurations in Dockerfiles.

One more advantage: it would be easy to see which container is failing and its logs.

In theory, we can make a fully configurable helm chart.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CI/CDCI/CD procedures or container usagedocumentationDocumentation improvements or additionsenhancementNew feature or requestgood first issueGood for newcomershelp wantedExternal contribution is required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions