Skip to content

Commit 8901620

Browse files
authored
Improve Documentation (#241)
1 parent d9a73f6 commit 8901620

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

README.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,36 @@ ironcore-image help
6060

6161
This will print the available commands.
6262

63-
To build an ironcore-image, you'll need the rootfs, initramfs and kernel
64-
of your desired operating system. Once you have them on disk, simply run
63+
To build an ironcore-image, prepare the OS artifacts for each target architecture
64+
and pass them via `--config`. You can repeat `--config` for multi-arch builds.
65+
Supported keys are `arch`, `rootfs`, `initramfs`, `kernel`, `squashfs`, `uki`,
66+
`iso`, and `cmdline`.
6567

6668
```shell
6769
ironcore-image build \
68-
--rootfs-file <path to rootfs file> \
69-
--initramfs-file <path to initramfs> \
70-
--kernel-file <path to kernel file>
70+
--tag my-image:latest \
71+
--config arch=amd64,rootfs=./rootfs.ext4,initramfs=./initramfs.img,kernel=./vmlinuz
7172
```
7273

73-
This will build the image, put it into your local OCI store (usually at `~/.ironcore`)
74-
and print out the id of the built image.
74+
This will build the image, put it into your local OCI store (usually at `~/.ironcore`),
75+
and create a local index manifest tagged `my-image:latest`.
7576

76-
To tag the image with a more fluent name, run
77+
For a multi-arch image, repeat `--config` for each architecture:
7778

7879
```shell
79-
ironcore-image tag <id> my-image:latest
80+
ironcore-image build \
81+
--tag my-image:latest \
82+
--config arch=amd64,rootfs=./rootfs-amd64.ext4,initramfs=./initramfs-amd64.img,kernel=./vmlinuz-amd64 \
83+
--config arch=arm64,rootfs=./rootfs-arm64.ext4,initramfs=./initramfs-arm64.img,kernel=./vmlinuz-arm64
84+
```
85+
86+
To add an additional tag to an existing local image, run
87+
88+
```shell
89+
ironcore-image tag my-image:latest my-image:v1
8090
```
8191

82-
This will tag the image with the name `my-image` and the tag latest.
92+
This will tag the same image with the name `my-image` and the tag `v1`.
8393

8494
To push an image to a remote registry, make sure you authenticated your
8595
local docker client with that registry. Consult your registry provider's documentation
@@ -88,16 +98,17 @@ for instructions.
8898
Once authenticated, tag your image, so it points towards that registry, e.g.
8999

90100
```shell
91-
ironcore-image tag <id> ghcr.io/ironcore-dev/ironcore-image/my-image:latest
101+
ironcore-image tag my-image:latest ghcr.io/ironcore-dev/ironcore-image/my-image:latest
92102
```
93103

94-
To push the image to the registry, run
104+
To push a multi-arch image and its sub-manifests to the registry, run
95105

96106
```shell
97-
ironcore-image push ghcr.io/ironcore-dev/ironcore-image/my-image:latest
107+
ironcore-image push ghcr.io/ironcore-dev/ironcore-image/my-image:latest --push-sub-manifests
98108
```
99109

100-
> :danger: This currently doesn't do any output, wait a while for it to be done.
110+
This pushes the index manifest and also pushes each arch-specific manifest under
111+
the `-<arch>` suffix (for example `my-image:latest-amd64`).
101112

102113
To pull the pushed image, run
103114

0 commit comments

Comments
 (0)