Skip to content

Commit c360e10

Browse files
authored
Merge pull request #1 from jlebon/pr/main
README.md: minor tweaks
2 parents 9875093 + 0cccbfa commit c360e10

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ RUN rpm-ostree install https://dl.fedoraproject.org/pub/epel/epel-release-latest
4343
ostree container commit
4444
```
4545

46+
Note that in RHCOS 4.16 and newer, you can also use `dnf install` instead of `rpm-ostree install`.
47+
4648
And the command to build the container would look like:
4749

4850

@@ -53,15 +55,22 @@ podman build \
5355
--from $RHCOS_CONTAINER \
5456
--authfile $PULL_SECRET \
5557
--file Containerfile \
56-
--tag oci-archive:./my-custom-rhcos.ociarchive
58+
quay.io/myorg/myrepo:mytag
5759
```
5860

59-
60-
Now the layered container OCI archive is in the `my-custom-rhcos.ociarchive` file in the current working directory.
61-
61+
You will want to push this image to a registry so that it can be used as an
62+
`osImageUrl` in a MachineConfig as documented in the OpenShift docs.
6263

6364
# Creating disk boot images from the container image
6465

66+
First, we need to convert the image to an OCI archive:
67+
68+
```
69+
# from local storage
70+
skopeo copy containers-storage:quay.io/myorg/myrepo:mytag oci-archive:my-custom-rhcos.ociarchive
71+
# from a registry
72+
skopeo copy --authfile /path/to/pull-secret docker://registry.com/org/repo:latest oci-archive:./my-custom-rhcos.ociarchive
73+
``
6574
6675
You can now take that ociarchive and create a disk image for a
6776
platform (i.e. `qemu`, `metal` or `gcp`). First you need an
@@ -86,5 +95,3 @@ sudo ./build-custom-rhcos-disks.sh $ociarchive $platform
8695
8796
Which will create the file `my-custom-rhcos.ociarchive.x86_64.qcow2` in
8897
the current working directory that can then be used.
89-
90-
NOTE: you can also pull an image from a registry into a local ociarchive file with `skopeo copy --authfile /path/to/pull-secret docker://registry.com/org/repo:latest oci-archive:./my-custom-rhcos.ociarchive`.

0 commit comments

Comments
 (0)