CIA team,
I want ensure that the community is aware of the finer points of multi-image
construction and thus want to understand the following:
Docker is designed to support multi-arch images through the manifest list,
whereby an image defines a listing ol architecture specific images, e.g.
$ docker manifest inspect tomcat:8.0-jre8
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2836,
"digest":
"sha256:894b010f156b0698373c2152c4b6c2c775c793f640d24264a5a89ed199425eb1",
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
….
Note top-level mediatype is “..manifest.list..”
My understanding is that a multi-arch image can also be constructed without
explicity creating a manifest list. For example, one may take the above base
image and build a child image on an Intel machine, tag it with a
registry:repo:tag, and push to the registry, then, build an image w the same
Dockerfile on an Arm machine, and tag and push to the same label. The result:
$ docker manifest inspect myRegistry/myRepo:tag
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 16151,
"digest":
"sha256:c23a71ded8d3003de4387c57dedf9a91d21559ea3590bb931a9cde6b7f5bb793"
},
"layers": [
{
"mediaType":
"application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 43123621,
"digest":
"sha256:421608e4e92275f9265604523f9299cf5f4bd493a1ea3affd62c265b38fc8823"
},
….
Note top-level mediaType = “…manifest…” Note and the lack of ‘platform’
elements in the 'layers’ section
However, an image built this way runs on both Intel and Arm - appears to be a
multi-arch image and a functional equivalent to a manifest-list
IOW, it appears docker can support multi-arch mages both via the manifest list
(aka fat manifest), and simply via a manifest that contains layers for multiple
platforms.
Comments?
Frank Sandoval
[email protected]
OAM Technologies, representing Arm
OOF committer
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14493): https://lists.onap.org/g/onap-discuss/message/14493
Mute This Topic: https://lists.onap.org/mt/28745448/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-