Skip to content

[Suggestion] Add options to skip "Installing basic packages" step for distrobox-enter #1734

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

Open
6b5d opened this issue Apr 23, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@6b5d
Copy link

6b5d commented Apr 23, 2025

Is your feature request related to a problem? Please describe.
Every time you enter a stopped container, distrobox enter will also install basic packages (this behaviour is probably inherited from distrobox init). But if you don't have internet yet, this step is either stuck or errors out (at least for fedora containers, I am not sure if this happens to other distributions). Sometimes we need to use the tools inside the distrobox without the internet.

Describe the solution you'd like
Maybe adding options to skip installing basic packages for distrobox enter can solve this problem.

Describe alternatives you've considered
Or skip installing basic packages automatically when there is no internet connection.

Additional context
This is what happens if I shutdown my internet and try to enter a fedora container:
Image

@6b5d 6b5d added the enhancement New feature or request label Apr 23, 2025
@6b5d
Copy link
Author

6b5d commented Apr 24, 2025

I found the real reason why distrobox init tries to install basic packages every time a container is started.

This seems to be a bug in the distrobox init, which checks the dependencies and tries to install them if the command is not found. But the setup_dnf never successfully install some of the missing depdendencies. In fedora 42, wget and script are still missing after calling setup_dnf to install them.

I also tried quay.io/fedora/fedora:41, which also has the similar problem (wget is missing in this image).

Maybe we can build the package list from the output of dnf provides "${dep}" instead of hard coding the list.

@tl87
Copy link

tl87 commented Apr 29, 2025

I'm also experincing this issue.

@6b5d
Copy link
Author

6b5d commented May 1, 2025

I'm also experincing this issue.

I work around it by installing the missing packages manually.

@tl87
Copy link

tl87 commented May 2, 2025

I'm also experincing this issue.

I work around it by installing the missing packages manually.

thanks, it works :)

lukehsiao added a commit to lukehsiao/omakase-blue that referenced this issue May 28, 2025
There appears to be a bug in `distrobox init` that triggers the
installation of basic packages every time a container is started. This
is awful if you don't have an internet connection and generally delays
toolbox startup.

[[1]] suggests that we can workaround this by ensuring `wget` and
`script` are installed.

[1]: 89luca89/distrobox#1734
lukehsiao added a commit to lukehsiao/omakase-blue that referenced this issue May 28, 2025
There appears to be a bug in `distrobox init` that triggers the
installation of basic packages every time a container is started. This
is awful if you don't have an internet connection and generally delays
toolbox startup.

[[1]] suggests that we can workaround this by ensuring all basic
packages are installed.

[1]: 89luca89/distrobox#1734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants