docker/install: Fix latest image install on lima#480
Conversation
leads to 404: https://raw.githubusercontent.com/moby/moby/27.3.1/contrib/init/systemd/docker.service Looks like commit sha is not resolved and |
946f9ec to
5898099
Compare
|
EDIT: The url is correct, but for some reason the gitCommit isn't set. Looking into it. |
src/docker/install.ts
Outdated
| const manifest = await moby.getPlatformManifest(tag); | ||
| const config = await moby.getConfig<ImageConfig>(manifest.config.digest); |
There was a problem hiding this comment.
I think labels and annotations will only be on the manifest list (index) config
There was a problem hiding this comment.
Looking at docker buildx imagetools inspect moby/moby-bin:latest --raw , index doesn't have these:
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:c52ff4ad684b729f597eefacf1abc65913dcb3423071b71997cd271690c8a9b7",
"size": 1630,
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:fda20c7387897ee54811fd74b96472c4a454a62f29b5eb595caaeb4e04f01bd5",
"size": 567,
"annotations": {
"vnd.docker.reference.digest": "sha256:c52ff4ad684b729f597eefacf1abc65913dcb3423071b71997cd271690c8a9b7",
"vnd.docker.reference.type": "attestation-manifest"
},
"platform": {
"architecture": "unknown",
"os": "unknown"
}
...There was a problem hiding this comment.
The image config has them though:
docker buildx imagetools inspect moby/moby-bin:latest@sha256:fe77a2f844e3db621de180b88e0e8c5439dd6802e4e6efcc5371be4a05e252d3 --raw | jq
{
"architecture": "amd64",
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"WorkingDir": "/",
"Labels": {
"org.opencontainers.image.created": "2024-09-20T18:10:20.768Z",
"org.opencontainers.image.description": "The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "41ca978a0a5400cc24b274137efa9f25517fcc0b",
"org.opencontainers.image.source": "https://github.com/moby/moby",
"org.opencontainers.image.title": "moby",
"org.opencontainers.image.url": "https://github.com/moby/moby",
"org.opencontainers.image.version": "27.3.1"
}
},5898099 to
82cd3fd
Compare
|
Drafted for now and added some debug logs. Will undraft once fixed. |
8c34034 to
c1a54eb
Compare
|
Fixed! The issues were:
|
`latest` is not a valid git tag or revision to get the matching systemd unit files. Look up the exact source git commit from the `'org.opencontainers.image.revision` image config label. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
c1a54eb to
61c10b2
Compare
latestis not a valid git tag or revision to get the matching systemd unit files.Look up the exact source git commit from the
org.opencontainers.image.revisionimage config label.