ublue-os / toolboxes

Centralized repository of containers designed for Toolbox/Distrobox
Apache License 2.0
42 stars 10 forks source link

Wolfi Container doesn't work with toolbox #71

Open lduktus opened 3 months ago

lduktus commented 3 months ago

It seems the current wolfi image doesn't work with toolbox:

> toolbox create --image ghcr.io/ublue-os/wolfi-toolbox:latest wolfi
Created container: wolfi
Enter with: toolbox enter wolfi

> toolbox enter wolfi
Error: invalid entry point PID of container wolfi

> podman start --attach wolfi-test
level=debug msg="Running as real user ID 0"
level=debug msg="Resolved absolute path to the executable as /usr/bin/toolbox"
level=debug msg="TOOLBOX_PATH is /usr/bin/toolbox"
level=debug msg="Migrating to newer Podman"
level=debug msg="Migration not needed: running inside a container"
level=debug msg="Setting up configuration"
level=debug msg="Setting up configuration: file /etc/containers/toolbox.conf not found"
level=debug msg="Setting up configuration: file /root/.config/containers/toolbox.conf not found"
level=debug msg="Resolving container and image names"
level=debug msg="Container: ''"
level=debug msg="Distribution (CLI): ''"
level=debug msg="Image (CLI): ''"
level=debug msg="Release (CLI): ''"
level=debug msg="Resolved container and image names"
level=debug msg="Container: 'fedora-toolbox-38'"
level=debug msg="Image: 'fedora-toolbox:38'"
level=debug msg="Release: '38'"
level=debug msg="Creating /run/.toolboxenv"
level=debug msg="Path /run/host/etc exists"
level=debug msg="Resolved /etc/localtime to /run/host/usr/share/zoneinfo/Europe/Berlin"
level=debug msg="Creating regular file /etc/machine-id"
level=debug msg="Binding /etc/machine-id to /run/host/etc/machine-id"
level=debug msg="Creating directory /run/libvirt"
level=debug msg="Binding /run/libvirt to /run/host/run/libvirt"
level=debug msg="Creating directory /run/systemd/journal"
level=debug msg="Binding /run/systemd/journal to /run/host/run/systemd/journal"
level=debug msg="Creating directory /run/systemd/resolve"
level=debug msg="Binding /run/systemd/resolve to /run/host/run/systemd/resolve"
level=debug msg="Creating directory /run/systemd/sessions"
level=debug msg="Binding /run/systemd/sessions to /run/host/run/systemd/sessions"
level=debug msg="Creating directory /run/systemd/system"
level=debug msg="Binding /run/systemd/system to /run/host/run/systemd/system"
level=debug msg="Creating directory /run/systemd/users"
level=debug msg="Binding /run/systemd/users to /run/host/run/systemd/users"
level=debug msg="Creating directory /run/udev/data"
level=debug msg="Binding /run/udev/data to /run/host/run/udev/data"
level=debug msg="Creating directory /run/udev/tags"
level=debug msg="Binding /run/udev/tags to /run/host/run/udev/tags"
level=debug msg="Creating directory /tmp"
level=debug msg="Binding /tmp to /run/host/tmp"
level=debug msg="Creating directory /var/lib/flatpak"
level=debug msg="Binding /var/lib/flatpak to /run/host/var/lib/flatpak"
level=debug msg="Creating directory /var/lib/libvirt"
level=debug msg="Binding /var/lib/libvirt to /run/host/var/lib/libvirt"
level=debug msg="Creating directory /var/lib/systemd/coredump"
level=debug msg="Binding /var/lib/systemd/coredump to /run/host/var/lib/systemd/coredump"
level=debug msg="Creating directory /var/log/journal"
level=debug msg="Binding /var/log/journal to /run/host/var/log/journal"
level=debug msg="Creating directory /var/mnt"
level=debug msg="Binding /var/mnt to /run/host/var/mnt"
level=debug msg="Preparing to redirect /home to /var/home"
level=debug msg="/var/home isn't a symbolic link"
Error: failed to redirect /home to /var/home: remove /home: directory not empty

A simple rm -rf /home/nonroot seems to work, at least the container doesn't exits. However I still can't enter the toolbox, which I haven't investigated further.

m2Giles commented 2 months ago

While you can delete /home/nonroot, toolbox still has some dependencies that wofli doesn't appear to provide at this time. I believe the issues are around missing PAM files at this point.

There are community builds for toolbox (much like this project) one of which is https://github.com/toolbx-images/images which has alpine support.

m2Giles commented 1 month ago

I've deleted the the nonroot user so wolfi-toolbox can "work" however, you will need to manually edit the sudoers file to enable the wheel group passwordless sudo.

Additionally, wolfi doesn't have the terminfo for xterm256-color so you'll need to copy that in place.

lduktus commented 3 weeks ago

Thanks I will try, when I find some time these days.