Skip to content

Commit

Permalink
README.md: update local storage docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsleyzissou committed Mar 20, 2024
1 parent e21a5fa commit 358af07
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@ sudo podman run \
--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 \
quay.io/centos-bootc/fedora-bootc:eln
```

### Using local containers
NOTE: local storage is being used by default. If the `--local` flag is not provided, as in the above example,
the latest image will be pulled into the local storage.

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
### Using local containers

Since the container is run in `rootful` only root container storage paths are allowed.
To skip pulling an image into local storage and use an existing container image, the `--local` flag can be used,
as below:

```bash
sudo podman run \
Expand All @@ -63,16 +64,13 @@ sudo podman run \
--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
```

When using the --local flag, we need to mount the storage path as a volume. With this enabled, it is assumed that the target container is in the container storage.

### 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.
Expand Down

0 comments on commit 358af07

Please sign in to comment.