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

Add docs section or page describing how to tell toolbox to build customized images #1102

Closed
djasa opened this issue Sep 2, 2022 · 8 comments
Assignees
Labels
1. Feature request A request for a new feature

Comments

@djasa
Copy link

djasa commented Sep 2, 2022

Is your feature request related to a problem? Please describe.
Toolbx creates images that are expected to be modified. However many people are likely to need stable set of their modification that'd be repeated on every (re)build of their toolboxes.

Describe the solution you'd like
There are nice solutions available online:

I'd like to see example like this explained in online docs and manual page in a way that person who never worked with containers before will be able to write their own basic script that'd install custom set of packages and modify some stuff in toolbox container's /etc.

Describe alternatives you've considered

Additional context
This could be also reply to requests for other distro's support for the time being.

@djasa djasa added the 1. Feature request A request for a new feature label Sep 2, 2022
@akdev1l
Copy link

akdev1l commented Sep 2, 2022

Hi I will leave some observations here,

I am not sure whether the documentation really belongs in toolbox itself. There's no toolbox build command and I think that's good. toolbox is by design supposed to be less complex than podman.

The reality of building a custom image is that you need to know Containerfile syntax - this is going to be the biggest hurdle to any new user. Documenting such syntax just seems out of scope as there are plenty of resources online doing that.

I guess we could create some sort of tutorial that shows a minimum of what needs to be done(I still don't think this should be in the man pages however). Though I have been thinking of creating a small web application that essentially allows you to quickly generate a Containerfile without knowing the syntax - maybe that would be a better approach. Let me know what you think about this approach.

As for:

This could be also reply to requests for other distro's support for the time being.

I went ahead myself and build images for some popular distros here: https://github.com/akdev1l/toolbox-images. Feel free to give it a try.

This issue seems closely related (if not duplicate) with #1077 - I left a quick way of creating a custom image without resorting to Containerfiles there. Maybe that will work for you for the time being.

just my 2 cents, hope that's somewhat useful

@djasa
Copy link
Author

djasa commented Sep 7, 2022

Hi I will leave some observations here,

Thanks :)

I am not sure whether the documentation really belongs in toolbox itself. There's no toolbox build command and I think that's good. toolbox is by design supposed to be less complex than podman.

The reality of building a custom image is that you need to know Containerfile syntax - this is going to be the biggest hurdle to any new user. Documenting such syntax just seems out of scope as there are plenty of resources online doing that.

I don't think that full reference of Dockerfile (or buildah* commands?) would be necesary here. Just bare minimum allowing users to do the basic tasks (image base, run command, copy file) with pointers to podman or Dockerfile resources where this isn't enough.

This issue seems closely related (if not duplicate) with #1077 - I left a quick way of creating a custom image without resorting to Containerfiles there.

Thanks, my search didn't yield it. It seems to me that the ends and means are different in these two however. Creating a base image is good when you need more images in parallel, however for how I use toolbox (sth breaks within containers after months of having it), such an approach wouldn't be wise as after just a few iterations, I'd end up with image based on old system and full of CVEs. :/

@travier
Copy link
Member

travier commented Sep 9, 2022

See also the progress we made in #1019 for other distro toolboxes.

@matthiasclasen
Copy link
Collaborator

After looking around a bit in the existing documentation, I would suggest that we add some information to the website with details about toolbox images, and how to create custom ones.

This does not seem to fit well into either the man pages or the existing install & use section.

@matthiasclasen
Copy link
Collaborator

#1077 explains a nice way to create custom images that would be good to include in the docs

nievesmontero added a commit to nievesmontero/containertoolbx.org that referenced this issue Sep 22, 2022
containers/toolbox#1102

Signed-off-by: Nieves Montero <nmontero@redhat.com>
matthiasclasen pushed a commit to containers/containertoolbx.org that referenced this issue Sep 29, 2022
containers/toolbox#1102

Signed-off-by: Nieves Montero <nmontero@redhat.com>

Signed-off-by: Nieves Montero <nmontero@redhat.com>
@djasa
Copy link
Author

djasa commented Oct 4, 2022

@matthiasclasen hi, this is what I meant with just one tiny bit missing: command how to create a toolbx image from Containerfile (I guess podman build -f Containerfile? Will the resulting image be directly visible/usable by toolbox?).

@akdev1l
Copy link

akdev1l commented Oct 7, 2022

@matthiasclasen hi, this is what I meant with just one tiny bit missing: command how to create a toolbx image from Containerfile (I guess podman build -f Containerfile? Will the resulting image be directly visible/usable by toolbox?).

The command you want is podman build -t mycustomimage:latest . and then it will be usable by toolbox by doing toolbox create -i mycustomimage:latest.

@djasa
Copy link
Author

djasa commented Oct 10, 2022

The command you want is podman build -t mycustomimage:latest. and then it will be usable by toolbox by doing toolbox create -i mycustomimage:latest.

Thanks!

@matthiasclasen, could we have these spelled out in /install/ or alongside example Containerfile, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Feature request A request for a new feature
Projects
None yet
Development

No branches or pull requests

5 participants