Skip to content

Commit 9b42592

Browse files
committed
docs(readme): update
1 parent 1b0f7f8 commit 9b42592

4 files changed

Lines changed: 156 additions & 17 deletions

File tree

README.md

Lines changed: 156 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ Normal users should not need to modify the files in this repository.
5555
- [Stable - arm64](#stable---arm64)
5656
- [Development - amd64](#development---amd64)
5757
- [Development - arm64](#development---arm64)
58+
- [Merging Architectures](#merging-architectures)
59+
- [Using `Buildx Imagetools`](#using-buildx-imagetools)
60+
- [Using `Manifest Create`](#using-manifest-create)
5861
- [Using Image](#using-image)
5962
- [Extra Notes](#extra-notes)
6063
- [Accessing Container Shell](#accessing-container-shell)
@@ -913,8 +916,11 @@ After completing the `docker buildx` commands above; you should now have a few n
913916
- `--tag ghcr.io/aetherinox/ubuntu:noble-development-arm64`
914917

915918
<br />
919+
<br />
920+
921+
#### Merging Architectures
916922

917-
Next, we need to take these two images, and merge them into one so that both architectures are available without having to push separate images. You need to obtain the SHA256 hash digest for the `amd64` and `arm64` images. You can go to the registry where you uploaded the images and then copy them. Or you can run the commands specified below depending on which release type you want:
923+
Next, we need to take these two images, and merge them into one so that both architectures are available without having to push separate images. You need to obtain the `SHA256` hash digest for the `amd64` and `arm64` images. You can go to the registry where you uploaded the images and then copy them. Or you can run the commands specified below depending on which release type you want:
918924

919925
<br />
920926
<br />
@@ -994,11 +1000,8 @@ If you opted to build both the **stable** and **development** releases; you shou
9941000
> $ docker images --all --no-trunc | grep aetherinox
9951001
>
9961002
> ghcr.io/aetherinox/ubuntu noble-amd64 sha256:d359e7dc422bf0a80ab40f6ff140da72a2d16f69a352e2e9c76c324f9e8bc50e 3 minutes ago 206MB
997-
>
9981003
> ghcr.io/aetherinox/ubuntu noble-arm64 sha256:d497b9ea99e7d0dafc48fb29cb041fcddb952103d14171086844c3f45dc9999b 4 minutes ago 238MB
999-
>
10001004
> ghcr.io/aetherinox/ubuntu noble-development-amd64 sha256:f120bf8425df79d36fa743472aec03edde64864d2a59dd256b6ee258b62c8865 4 minutes ago 206MB
1001-
>
10021005
> ghcr.io/aetherinox/ubuntu noble-development-arm64 sha256:21e6ed47020755e4627d93d201af3309b93bd4c6a0e6250e17f19d4b15e4492f 5 minutes ago 238MB
10031006
> ```
10041007
>
@@ -1009,10 +1012,23 @@ If you opted to build both the **stable** and **development** releases; you shou
10091012
> - `docker buildx imagetools inspect ghcr.io/aetherinox/ubuntu:noble-development-arm64`
10101013
>
10111014

1015+
<br />
1016+
1017+
At this point, you should have all of your images created for amd64 and arm64, however, each image sits by itself. If you want to merge both architectures into a single image; you must manipulate the manifest to merge them. The next section will explain how to do so.
1018+
1019+
There are two ways to do this; you can pick either one:
1020+
1021+
- [Using Buildx Imagetools](#using-buildx-imagetools)
1022+
- [Using Manifest Create](#using-manifest-create)
1023+
10121024
<br />
10131025
<br />
10141026

1015-
Once you have the correct `SHA256` hash digests; paste them into the command below. This command is where you can specify the real `--tag` that the public image will have. The previous tags were simply placeholders and no longer matter.
1027+
##### Using `Buildx Imagetools`
1028+
1029+
This section explains how you to take your individual images, and merge them so that you end up with a single image with both arcitectures.
1030+
1031+
Once you have all of your images list of `SHA256` hash digests; paste them into the command below. This command is where you can specify the real `--tag` that the public image will have. The previous tags were simply placeholders and no longer matter.
10161032

10171033
<br />
10181034

@@ -1071,7 +1087,7 @@ docker buildx imagetools create \
10711087
<br />
10721088

10731089
> [!NOTE]
1074-
> Compared to the **stable** release which has 4 tags; the **development** release only has one tag.
1090+
> Compared to the **stable** release which has 4 tags; the **development** release only has 1 tag.
10751091

10761092
<br />
10771093

@@ -1083,38 +1099,161 @@ The command above will output the following image:
10831099

10841100
The image above will give you **one image**, since we only specified one `--tag`, and it will list both arcitectures for each image.
10851101

1102+
Alternatively, you could use the [🗔 manifest create](#using-manifest-create) command
1103+
10861104
<br />
1105+
<br />
1106+
1107+
##### Using `Manifest Create`
1108+
1109+
This section explains how you to take your individual images, and merge them so that you end up with a single image with both arcitectures.
10871110

1088-
Alternatively, you could use the `🗔 manifest create` command; as an example, you can merge multiple architecture images together into a single image. The top line with `🔖 aetherinox/ubuntu:latest` can be any name. However, all images after `--amend` MUST be already existing images uploaded to the registry.
1111+
As an example, you can merge multiple architecture images together into a single image. The top line with `🔖 aetherinox/ubuntu:noble` can be any name. However, all images after `--amend` MUST be already existing images uploaded to the registry.
10891112

10901113
```shell
1091-
docker manifest create ghcr.io/aetherinox/ubuntu:latest \
1092-
--amend ghcr.io/aetherinox/ubuntu:latest-amd64 \
1093-
--amend ghcr.io/aetherinox/ubuntu:latest-arm32v7 \
1094-
--amend ghcr.io/aetherinox/ubuntu:latest-arm64v8
1114+
docker manifest create ghcr.io/aetherinox/ubuntu:noble \
1115+
--amend ghcr.io/aetherinox/ubuntu:noble-amd64 \
1116+
--amend ghcr.io/aetherinox/ubuntu:noble-arm32v7 \
1117+
--amend ghcr.io/aetherinox/ubuntu:noble-arm64v8
10951118
1096-
docker manifest push ghcr.io/aetherinox/ubuntu:latest
1119+
docker manifest push ghcr.io/aetherinox/ubuntu:noble
10971120
```
10981121

10991122
<br />
11001123

11011124
In this example, we take the existing two files we created earlier, and merge them into one. You can either specify the image by `SHA256 digest`, or tag:
11021125

11031126
```shell
1104-
# Example 1 (using tag)
1105-
docker manifest create ghcr.io/aetherinox/ubuntu:latest \
1127+
# Stable - Create Manifest
1128+
$ docker manifest create ghcr.io/aetherinox/ubuntu:noble \
11061129
--amend ghcr.io/aetherinox/ubuntu:noble-amd64 \
11071130
--amend ghcr.io/aetherinox/ubuntu:noble-arm64
11081131
1109-
# Example 2 (using sha256 hash)
1110-
docker manifest create ghcr.io/aetherinox/ubuntu:latest \
1132+
# OUTPUT
1133+
Created manifest list ghcr.io/aetherinox/ubuntu:noble
1134+
```
1135+
1136+
<br />
1137+
1138+
Then push the manifest to your registry:
1139+
1140+
```shell
1141+
# Push Manifest
1142+
$ docker manifest push ghcr.io/aetherinox/ubuntu:noble
1143+
1144+
# OUTPUT
1145+
sha256:f0a1e3ecaabed06006bd03ecab5be5e8edbcd55cf22a3b14f3aa9b8849d82910
1146+
```
1147+
1148+
<br />
1149+
1150+
If you look at your docker registry, you should see:
1151+
1152+
<br />
1153+
1154+
<p align="center"><img style="width: 80%;text-align: center;" src="docs/img/core/06.png"><br><sub><sup><b>Registry v2:</b> merged <code>amd64</code> and <code>arm64</code> for <code>Stable</code> release; using <code>docker manifest create</code></sup></sub></p>
1155+
1156+
1157+
<br />
1158+
1159+
For the **development** release:
1160+
1161+
```shell
1162+
# Development - Create Manifest
1163+
docker manifest create ghcr.io/aetherinox/ubuntu:noble-development \
1164+
--amend ghcr.io/aetherinox/ubuntu:noble-development-amd64 \
1165+
--amend ghcr.io/aetherinox/ubuntu:noble-development-arm64
1166+
1167+
# OUTPUT
1168+
Created manifest list ghcr.io/aetherinox/ubuntu:noble-development
1169+
```
1170+
1171+
<br />
1172+
1173+
Then push the manifest to your registry:
1174+
1175+
```shell
1176+
# Push Manifest
1177+
$ docker manifest push ghcr.io/aetherinox/ubuntu:noble-development
1178+
1179+
# OUTPUT
1180+
sha256:a0ec1af9d2d9f4c2f45ab1f0cf9c5d60f8dc2660b1eb1011a0636b971a804c53
1181+
```
1182+
1183+
<br />
1184+
1185+
If you look at your docker registry, you should see:
1186+
1187+
<p align="center"><img style="width: 80%;text-align: center;" src="docs/img/core/07.png"><br><sub><sup><b>Registry v2:</b> merged <code>amd64</code> and <code>arm64</code> for <code>Development</code> release; using <code>docker manifest create</code></sup></sub></p>
1188+
1189+
<br />
1190+
1191+
> [!NOTE]
1192+
> If you push the manifest to your online registry, and notice that the image contains multiple of the same architecture images; you need to remove the manifest and re-create it using:
1193+
>
1194+
> ```shell
1195+
> docker manifest rm ghcr.io/aetherinox/ubuntu:nobel
1196+
> ```
1197+
1198+
<br />
1199+
1200+
```shell
1201+
# Example 2 - Development - (using tag)
1202+
docker manifest create ghcr.io/aetherinox/ubuntu:noble-development \
1203+
--amend ghcr.io/aetherinox/ubuntu:noble-development-amd64 \
1204+
--amend ghcr.io/aetherinox/ubuntu:noble-development-arm64
1205+
```
1206+
1207+
1208+
1209+
1210+
1211+
1212+
1213+
1214+
1215+
1216+
1217+
<br />
1218+
1219+
If you want to create the manifest using the `SHA256`, you can use one of these altnerative commands:
1220+
1221+
```shell
1222+
# Example 1 - Stable - (using sha256 hash)
1223+
docker manifest create ghcr.io/aetherinox/ubuntu:noble-development \
11111224
--amend ghcr.io/aetherinox/ubuntu@sha256:a6a5bdba912df6247c663c04d214ca4ef2e3b5d6127ac117dee6c28d9b5c6f35 \
11121225
--amend ghcr.io/aetherinox/ubuntu@sha256:9b977c55f5fadf7e5601b908dd187597ea4865c5f5e6e232d73f7053d6477ae3
11131226
1227+
# Example 2 - Development - (using sha256 hash)
1228+
docker manifest create ghcr.io/aetherinox/ubuntu:noble-development \
1229+
--amend ghcr.io/aetherinox/ubuntu@sha256:2819d07ccce30dcad5729b66fa0268660b7da9e304ef75694e08953ca5c1a31e \
1230+
--amend ghcr.io/aetherinox/ubuntu@sha256:d3157db4bc9190e7926f39820a373bf04379704382de741fae272771eb587c45
1231+
1232+
# Push Manifest
1233+
docker manifest push ghcr.io/aetherinox/ubuntu:noble-development
1234+
1235+
# OUTPUT
1236+
Created manifest list ghcr.io/aetherinox/ubuntu:noble-development
1237+
```
1238+
1239+
<br />
1240+
1241+
After completing one of the commands above, you should see:
1242+
1243+
```shell
1244+
1245+
11141246
# Push manifest changes to registry
11151247
docker manifest push ghcr.io/aetherinox/ubuntu:latest
1248+
1249+
1250+
sha256:a0ec1af9d2d9f4c2f45ab1f0cf9c5d60f8dc2660b1eb1011a0636b971a804c53
11161251
```
11171252

1253+
1254+
1255+
1256+
11181257
<br />
11191258

11201259
If you go back to your registry; you should now see multiple new entries, all with different tags. Two of the images are your old `amd64` and `arm64` images, and then you should have your official one with the four tags specified above. You can delete the two original images if you do not want them.
@@ -1126,7 +1265,7 @@ If you go back to your registry; you should now see multiple new entries, all wi
11261265

11271266
If you are pushing to Github's GHCR; the interface will look different, as Github merges all tags into a single listing, instead of Registry v2 listing each tag on its own:
11281267

1129-
<p align="center"><img style="width: 80%;text-align: center;" src="docs/img/core/06.png"><br><sub><sup><b>Registry v2:</b> Newly created <code>amd64</code> and <code>arm64</code> images, and merged containers with both architectures</sup></sub></p>
1268+
<p align="center"><img style="width: 80%;text-align: center;" src="docs/img/core/10.png"><br><sub><sup><b>Registry v2:</b> Newly created <code>amd64</code> and <code>arm64</code> images, and merged containers with both architectures</sup></sub></p>
11301269

11311270
<br />
11321271

docs/img/core/06.png

-3.98 KB
Loading

docs/img/core/07.png

39.3 KB
Loading

docs/img/core/10.png

41 KB
Loading

0 commit comments

Comments
 (0)