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

Support running from a container #28

Closed
wants to merge 1 commit into from

Commits on May 6, 2024

  1. Support running from a container

    Unlike on macOS and Windows, on Linux `podman machine` isn't a
    requirement for running containers given that... well, you can already
    run containers directly. So setting up a podman machine would purely be
    for the benefit of `podman-bootc`.
    
    OTOH, the alternative of using bootc-image-builder is much more flexible
    but requires root and is not as streamlined a process if one wants to
    either just kick the tires or want a faster iteration loop on bootable
    containers.
    
    Let's support running `podman-bootc` from a container. This allows users
    to get to a functional environment in one command:
    
    ```
    podman run -ti --device /dev/kvm quay.io/podman/podman-bootc
    ```
    
    This will bring up the 'bootstrap' podman machine, and give users a
    shell. Caching is also supported by mounting to `/cache`:
    
    ```
    podman run -ti -v ~/.cache/podman-bootc:/cache:z --device /dev/kvm \
      quay.io/podman/podman-bootc run <image>
    ```
    
    There is also a one-shot mode for the `run` command. This allows users
    to boot a bootable container with a *single* command:
    
    ```
    podman run -ti --device /dev/kvm quay.io/podman/podman-bootc run <image>
    ```
    
    As opposed to b-i-b, all this works fine in rootless podman. The only
    main requirement is `/dev/kvm`, which is of course not new.
    
    Another way to look at this is that it de-emphasizes podman machine
    and focuses on the image building, caching, and booting aspects of
    podman-bootc, which is where the most value is for Linux users.
    
    Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
    jlebon committed May 6, 2024
    Configuration menu
    Copy the full SHA
    fe78995 View commit details
    Browse the repository at this point in the history