When working with docker, it always get the iamge fro mthe docker repo, but I wondered, what if I could just get a raw OS image and create my own, locally. Well, this is the process.
Why? it’s FUN.
1. Get the .xyz image from
https://fedoraproject.org/cloud/download/ (ussually the “Fedora Cloud 38 Raw raw.xz”)
2. tools installation:
dnf install qemu-utils libguestfs-tools
3. Extract the raw image:
unxz Fedora-Cloud-Base-38-1.6.x86_64.raw.xz
4. Generate the tar.gz
virt-tar-out -a Fedora-Cloud-Base-38-1.6.x86_64.raw / - | gzip > f38.tar.gz
5. Create the docker image with the tag
docker import f38.tar.gz f38x:latest
6. Create the container
docker run -it --name app1 f38x /bin/bash
7. Create the app
docker start app1
8. Execute the container
docker exec -it app1 /bin/bash