Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divide Dockerfile to various containers in selkies-vdi #161

Open
maxpain opened this issue Jul 21, 2024 · 4 comments
Open

Divide Dockerfile to various containers in selkies-vdi #161

maxpain opened this issue Jul 21, 2024 · 4 comments
Labels
CI/CD CI/CD procedures or container usage documentation Documentation improvements or additions enhancement New feature or request good first issue Good for newcomers help wanted External contribution is required

Comments

@maxpain
Copy link

maxpain commented Jul 21, 2024

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.

@maxpain maxpain added the enhancement New feature or request label Jul 21, 2024
@ehfd
Copy link
Member

ehfd commented Jul 21, 2024

@dimm0 I think this is similar to what we have discussed a few days ago.

@ehfd
Copy link
Member

ehfd commented Jul 21, 2024

Note that this should be a separate approach, preferably in selkies-vdi, which did a very similar thing to earlier Selkies-GStreamer releases.

The existing containers are not to be replaced with this approach because of interoperability in arbitrary Kubernetes environments and Apptainer.

@ehfd
Copy link
Member

ehfd commented Jul 21, 2024

This itself should not be the most complex thing to do, because I've already tried my best to expose all sorts of sockets in /tmp and thus should work by sharing with tmpfs. It's just labor and testing.

@ehfd ehfd added documentation Documentation improvements or additions good first issue Good for newcomers help wanted External contribution is required CI/CD CI/CD procedures or container usage labels Jul 21, 2024
@ehfd ehfd changed the title Refactor Docker examples Divide Dockerfile to various containers in selkies-vdi Jul 22, 2024
@ehfd
Copy link
Member

ehfd commented Jul 22, 2024

Note that the reason I don't want this to be default is because this way is harder to accommodate various environments plus the fact that many people want a simple docker run command. selkies-vdi is meant to decompose multiple services, so should be done there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD CI/CD procedures or container usage documentation Documentation improvements or additions enhancement New feature or request good first issue Good for newcomers help wanted External contribution is required
Projects
None yet
Development

No branches or pull requests

2 participants