Skip to content

Commit

Permalink
README: use local storage by default
Browse files Browse the repository at this point in the history
Pulling container images into local storage is the new default behaviour
for `bootc-image-builder`. The README is updated to reflect this and
to explain how to achieve the previous default.
  • Loading branch information
kingsleyzissou committed Mar 12, 2024
1 parent 7cae771 commit 410c36a
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,6 @@ by adding a volume-mount for the local file as well as the `--config` flag to th

The following command will create a QCOW2 disk image. First, create `./config.json` as described above to configure user access.

```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 \
quay.io/centos-bootc/bootc-image-builder:latest \
--type qcow2 \
--config /config.json \
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 \
Expand All @@ -67,11 +44,12 @@ sudo podman run \
quay.io/centos-bootc/bootc-image-builder:latest \
--type qcow2 \
--config /config.json \
--local \
localhost/bootc:eln
quay.io/centos-bootc/fedora-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.
Note: we need to mount the storage path as a volume, since using containers-storage is the new default. If the target container is not
already in the local store, `bootc-image-builder` will attempt to copy it into containers-storage. The `--remote` flag can
be used to skip this and use the image from the remote registry.

### Running the resulting QCOW2 file on Linux (x86_64)

Expand Down

0 comments on commit 410c36a

Please sign in to comment.