diff --git a/README.md b/README.md index 08744768..44e81e16 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,33 @@ sudo podman run \ quay.io/centos-bootc/fedora-bootc:eln ``` +### Using local containers + +To use containers from local container's storage rather than a registry, we need to ensure two things: +- the container exists in local storage +- mount the local container storage + +Since the container is run in `rootful` only root container storage paths are allowed. + +```bash +sudo podman run \ + --rm \ + -it \ + --privileged \ + --pull=newer \ + --security-opt label=type:unconfined_t \ + -v $(pwd)/config.json:/config.json \ + -v $(pwd)/output:/output \ + -v /var/lib/containers/storage:/var/lib/containers/storage \ + quay.io/centos-bootc/bootc-image-builder:latest \ + --type qcow2 \ + --config /config.json \ + -- local \ + localhost/bootc:eln +``` + +Note we need to pass the `--local` flag, we need to mount the storage path as a volume and then use the name of the local container. + ### Running the resulting QCOW2 file on Linux (x86_64) A virtual machine can be launched using `qemu-system-x86_64` or with `virt-install` as shown below.