yosukes-dev/RHWSL

How would I create a rootfs.tar from a UBI image

Opened this issue · 2 comments

I have a question about how I could create a rootfs.tar from any RHEL UBI image release

I posted this on StackOverflow.

https://stackoverflow.com/questions/63958928/how-to-build-rootfs-tar-from-rhel-ubi-image-pulled-with-podman


If I pull a RHEL UBI image like so (On Windows using cygwin and podman),

$podman pull registry.access.redhat.com/ubi8/ubi

Is there a command I can run on the host system (Windows) to create a file on the host (Windows) that would be a rootfs.tar of the UBI image that was pulled?

I want to then use that rootfs.tar to run on the Windows host under WSL2.

If anyone has done this or if there is another way to fetch the UBI image as a rootfs.tar (to create a physical file on my Windows PC), it would be greatly helpful.


Thank You

Commands like the following may be useful.
mkdir rootfs && docker export $(docker create <image>) | tar -C rootfs -xvf -

I Follow this and work great!!
https://wsl.dev/mobyrhel8/