ublue-os / toolboxes

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

Ubuntu ephemeral container creation fails at first run #117

Open pid42 opened 2 weeks ago

pid42 commented 2 weeks ago

Describe the bug

When I press Ctrl + U for the first time , it will create an ephemeral ubuntu-lts container. But, the first time this command runs, it prints the following error:

/bin/sh: 2: /etc/profile.d/brew.sh: [[: not found

And drops to a /bin/sh prompt. When we close and press Ctrl+U again, it will open the terminal inside the ubuntu container as expected, now running bash, which means that the container was created, but the profile setup can be incomplete.

The problem here seems to be that /etc/profile.d/brew.sh is using "[[" , but ubuntu is trying to run that using its /bin/sh (which , if I do remember right, is dash and does not support [[ ).

What did you expect to happen?

The ubuntu container was sucessfuly created without errors and a terminal opened inside it.

Output of rpm-ostree status

State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 59min ago
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:stable
                   Digest: sha256:a0390ce9c85a06e83522d204c54dc4860b350b116934c511e929fd6ec7187feb
                  Version: 40.20240820.0 (2024-08-20T05:53:19Z)

  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:gts
                   Digest: sha256:9e08ff20deea7d2f8b07e62cfc206043e7535065110dad02f4e11a613ae6bf5d
                  Version: 39.20240824.0 (2024-08-25T05:52:38Z)

Output of groups

fdr wheel docker

Extra information or context

No response

pid42 commented 2 weeks ago

Screenshot from 2024-08-25 16-37-17

castrojo commented 2 weeks ago

Great catch! Pretty sure this goes in this repo, we'll see what the others think, thanks!