RHWSL icon indicating copy to clipboard operation
RHWSL copied to clipboard

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

Open devLinuxNC opened this issue 5 years ago • 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

devLinuxNC avatar Sep 18 '20 15:09 devLinuxNC

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

yosukes-dev avatar Sep 27 '20 23:09 yosukes-dev

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

mauriliofilho avatar Nov 05 '21 19:11 mauriliofilho