Skip to content

Commit

Permalink
bib: document local containers
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsleyzissou committed Mar 1, 2024
1 parent 0f4a19d commit 2cb52a0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2cb52a0

Please sign in to comment.