Skip to content

Fix Image Name in Manifest for Docker v1.10.0 images #22

@bbickerton

Description

@bbickerton

Older exported docker images, such as those made by docker 1.7.0, contain several layer directories and a repositories file. That file is a short JSON object holding the repo name, tag, and hash.

{
    "tauzero/test-loop": {
        "latest": "a8967fd6aec812a6795ffe4953d416532b3866e168f60066a241d08ba700998e"
    }
}

When we import docker images from the image service, the repositories file is updated with the assigned uuid name using the fixRepositoriesFile function.

New exported images, such as those made by docker 1.10.0 include an additonal file, the manifest.json

[{
    "Config": "8f898785cff843b9ab330ed35924c1d72bc7a37e66386232e3d95027f2b6659d.json",
    "RepoTags": ["tauzero/test-loop:latest"],
    "Layers": ["768d4f50f65f00831244703e57f64134771289e3de919a576441c9140e037ea2/layer.tar", "b3bbc4636fc59ec067f4a877899f2e008bf3e2fe55451ef78c090dd9709b3818/layer.tar", "1743d7c353b09160d6c8bc8f7cea2fcdbeaea2330d98f14ab723757ee5f16e38/layer.tar", "5634dce3a0081ec88be6e9dc149829a775b11b94bf2116f822a7bd688a99aaea/layer.tar", "92abfeb6712856ca6c60039d7eded949de973d2c8209516a68cee4ab7088f223/layer.tar", "ace0fd45046091a3b90d0d7f22aa6333ea350875532ee3ee95eb0cd74fe278eb/layer.tar"]
}]

Simply updating the repositories is no longer enough; I believe it is left in for backward compatibility. The manifest.json file will also need to be updated, specifically the RepoTags property, for this to work with the latest docker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions