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

provide option to use toolbox in our distrobox just recipes #186

Closed
bsherman opened this issue Jan 9, 2024 · 12 comments
Closed

provide option to use toolbox in our distrobox just recipes #186

bsherman opened this issue Jan 9, 2024 · 12 comments
Assignees

Comments

@bsherman
Copy link
Contributor

bsherman commented Jan 9, 2024

I suggest maybe add an argument to all our distrobox recipes which allows toggling toolbox, and perhaps allows setting an env var which defaults to toolbox. The idea people that some users definitely do use it exclusively.

Giving users a choice definitely is better in my opinion (but I think we should default to distrobox).

I agree, mostly from the position that our just recipes are all, already distrobox-*

Is it possible to import variable files into justfiles? That way, we could define all of our containers we want to use and make them available to both toolbox and distrobox.

Yes. This latter thought is basically what I was suggesting in my second option...

I'd be happy to merge this as is, but file a follow-up issue to be more "toolbox-friendly" and either coach you through the env var stuff or provide the PR myself.

Originally posted by @bsherman in #185 (comment)

@bsherman bsherman changed the title provice option to use toolbox in our distrobox just recipes provide option to use toolbox in our distrobox just recipes Jan 9, 2024
@bsherman
Copy link
Contributor Author

bsherman commented Jan 9, 2024

Context in #106 about why we want toolbox, not just distrobox.

@HikariKnight
Copy link
Member

when i get to reorging the distrobox just file, i want to make it possible to select image, set a name (using a just arg) and platform (distrobox or toolbox) as part of the overhaul, but since this would require some more work than the rest of the reorg, i decided to split reorging the distrobox just file as its own PR afterwards. 😃

@bsherman
Copy link
Contributor Author

@HikariKnight this relates to your comment here: #181 (comment)

Even though you are on the discussion already, linking it for reference.

@HikariKnight
Copy link
Member

Just updating that i am laying the groundwork for this now in #194
However i am not sure if everything that has a docker image has a toolbox image and UBI image so it would be nice to figure out the logic before putting it together.

@bsherman
Copy link
Contributor Author

It was discussed and determined that neither #194 nor #199 either addressed nor hindered this issue.

Also, an important point was raised, this issue is really about enabling toolbox for rhel and basic fedora toolboxes, not generically attempting to support all our various distroboxes with toolbox as that can't work given different feature sets.

@noelmiller noelmiller self-assigned this Jan 30, 2024
@HikariKnight
Copy link
Member

Should we try make the just recipe work similar to ujust distrobox-assemble where it reads from a simplified .ini manifest and generates a list of images from that.
I am thinking something like

[rhel-ubi8]
image=registry.access.redhat.com/ubi8/toolbox:latest
distro=
release=

[rhel9]
image=
distro=rhel
release=9

the part inside [] can be used as the container name similar to how distrobox assemble works or we could prompt for a container name because toolbox does not have actual assemble functionality.
I do not really want to write an ini parser for bash, but it might be possible or we could say all the keys are required.

Then just do, if image is empty it will use the distro and release keys.
Thoughts?

@noelmiller
Copy link
Member

This issue is tangentially related to this one: #210

@HikariKnight
Copy link
Member

Regarding my previous comment, we can make assemble only use the image key as i made the Toolbox command have an abstraction to decide if the image provided is a registry or not by just checking if it contains /
image

This simplifies the assemble file a lot into

[rhel-ubi8]
image=registry.access.redhat.com/ubi8/toolbox:latest

[rhel9]
image=rhel:9

@HikariKnight
Copy link
Member

@bsherman @noelmiller should we use /etc/toolbox as the location for our assemble files for toolbox?

@castrojo
Copy link
Member

Closing for now since there's not much energy in trying to make toolbox work for our use cases.

@bsherman
Copy link
Contributor Author

Actually @HikariKnight pretty much implemented this.

@HikariKnight
Copy link
Member

HikariKnight commented Apr 22, 2024

yep ujust toolbox-assemble and ujust toolbox-new

the assemble one is mostly a copy+paste of the "make a list of images and select one" from the ujust assemble for distrobox (since it was an easy way to have a standard way to provide a list of toolboxes using the same format as distrobox.ini but with the only option being what image to use)
so the only thing we update is the manifest file pointing to the rhel toolbox images. :)

i just forgot to close this 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants