Skip to content

not all components (blobs) got URL for oci: import #280

Description

@yarikoptic

for

(datalad-container) yoh@typhon:/tmp$ cd test-containers3
(datalad-container) yoh@typhon:/tmp/test-containers3$ datalad containers-add --url oci:docker://debian:stable-slim debian-slim
Getting image source signatures
Copying blob 5857029bddef done   |
Copying config 78e1977f41 done   |
Writing manifest to image destination
add(ok): .datalad/environments/debian-slim/image/blobs/sha256/b9c08c0f9f56ee44aa0c1aceaa5388f652f5c8217bd1abd8a9ad8761cf0f3377 (file)
add(ok): .datalad/environments/debian-slim/image/index.json (file)
add(ok): .datalad/environments/debian-slim/image/blobs/sha256/78e1977f41de5b28aa477527218ca777968f66fbb7d4d6d900ba130cc51e292d (file)
add(ok): .datalad/environments/debian-slim/image/oci-layout (file)
add(ok): .datalad/config (file)
add(ok): .datalad/environments/debian-slim/image/blobs/sha256/5857029bddef1835b8500dbadef27f195bd9411dd35ec8d716ad2d1b666b8934 (file)
save(ok): . (dataset)
action summary:
  add (ok: 6)
  save (ok: 1)
add(ok): .datalad/environments/debian-slim/image/blobs/sha256/b9c08c0f9f56ee44aa0c1aceaa5388f652f5c8217bd1abd8a9ad8761cf0f3377 (file)
add(ok): .datalad/environments/debian-slim/image/index.json (file)
add(ok): .datalad/environments/debian-slim/image/blobs/sha256/78e1977f41de5b28aa477527218ca777968f66fbb7d4d6d900ba130cc51e292d (file)
add(ok): .datalad/environments/debian-slim/image/oci-layout (file)
add(ok): .datalad/config (file)
add(ok): .datalad/environments/debian-slim/image/blobs/sha256/5857029bddef1835b8500dbadef27f195bd9411dd35ec8d716ad2d1b666b8934 (file)
save(ok): . (dataset)
containers_add(ok): /tmp/test-containers3/.datalad/environments/debian-slim/image (file)
[INFO   ] Initializing special remote datalad
gaction summary:
  add (ok: 6)
  containers_add (ok: 1)
  save (ok: 1)
(datalad-container) yoh@typhon:/tmp/test-containers3$ git annex whereis
whereis .datalad/environments/debian-slim/image/blobs/sha256/5857029bddef1835b8500dbadef27f195bd9411dd35ec8d716ad2d1b666b8934 (2 copies)
        cf13d535-b47c-5df6-8590-0793cb08a90a -- [datalad]
        eb4b0604-4bf5-419d-83ab-b016ea4f1647 -- yoh@typhon:/tmp/test-containers3 [here]

  datalad: https://registry-1.docker.io/v2/library/debian/blobs/sha256:5857029bddef1835b8500dbadef27f195bd9411dd35ec8d716ad2d1b666b8934
ok
whereis .datalad/environments/debian-slim/image/blobs/sha256/78e1977f41de5b28aa477527218ca777968f66fbb7d4d6d900ba130cc51e292d (1 copy)
        eb4b0604-4bf5-419d-83ab-b016ea4f1647 -- yoh@typhon:/tmp/test-containers3 [here]
ok
whereis .datalad/environments/debian-slim/image/blobs/sha256/b9c08c0f9f56ee44aa0c1aceaa5388f652f5c8217bd1abd8a9ad8761cf0f3377 (1 copy)
        eb4b0604-4bf5-419d-83ab-b016ea4f1647 -- yoh@typhon:/tmp/test-containers3 [here]
ok
whereis .datalad/environments/debian-slim/image/index.json (1 copy)
        eb4b0604-4bf5-419d-83ab-b016ea4f1647 -- yoh@typhon:/tmp/test-containers3 [here]
ok
whereis .datalad/environments/debian-slim/image/oci-layout (1 copy)
        eb4b0604-4bf5-419d-83ab-b016ea4f1647 -- yoh@typhon:/tmp/test-containers3 [here]
ok
(datalad-container) yoh@typhon:/tmp/test-containers3$ ls -ld .datalad/environments/debian-slim/image/blobs/sha256/b9c08c0f9f56ee44aa0c1aceaa5388f652f5c8217bd1abd8a9ad8761cf0f3377lrwxrwxrwx 1 yoh yoh 132 Oct 10 11:12 .datalad/environments/debian-slim/image/blobs/sha256/b9c08c0f9f56ee44aa0c1aceaa5388f652f5c8217bd1abd8a9ad8761cf0f3377 -> ../../../../../../.git/annex/objects/XV/Jm/MD5E-s1021--a92e1cec76a1017f7036101cd16dc946/MD5E-s1021--a92e1cec76a1017f7036101cd16dc946
(datalad-container) yoh@typhon:/tmp/test-containers3$ ls -l .datalad/environments/debian-slim/image/oci-layout
lrwxrwxrwx 1 yoh yoh 122 Oct 10 11:12 .datalad/environments/debian-slim/image/oci-layout -> ../../../../.git/annex/objects/jv/X4/MD5E-s30--8fe457e59221bb18c7d11fa5bb7ba6c9/MD5E-s30--8fe457e59221bb18c7d11fa5bb7ba6c9
(datalad-container) yoh@typhon:/tmp/test-containers3$ datalad containers-run --version
datalad_container 1.2.6+32.gafc1ea7

we might want to be more explicit and ensure that text files there go into git directly regardless of git annex config . but why 2nd blob didn't have url... that blob is a manifest blob and it is json. So if we configured text files to go to git -- we would be good. We need to at least warn people to configure in such a way!

(datalad-container) yoh@typhon:/tmp/test-containers3$ jq . < .datalad/environments/debian-slim/image/blobs/sha256/b9c08c0f9f56ee44aa0c1aceaa5388f652f5c8217bd1abd8a9ad8761cf0f3377
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.manifest.v1+json",
  "config": {
    "mediaType": "application/vnd.oci.image.config.v1+json",
    "digest": "sha256:78e1977f41de5b28aa477527218ca777968f66fbb7d4d6d900ba130cc51e292d",
    "size": 451,
    "data": "eyJjb25maWciOnsiRW52IjpbIlBBVEg9L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmluIl0sIkVudHJ5cG9pbnQiOltdLCJDbWQiOlsiYmFzaCJdfSwiY3JlYXRlZCI6IjIwMjUtMDktMjlUMDA6MDA6MDBaIiwiaGlzdG9yeSI6W3siY3JlYXRlZCI6IjIwMjUtMDktMjlUMDA6MDA6MDBaIiwiY3JlYXRlZF9ieSI6IiMgZGViaWFuLnNoIC0tYXJjaCAnYW1kNjQnIG91dC8gJ3N0YWJsZScgJ0AxNzU5MTA0MDAwJyIsImNvbW1lbnQiOiJkZWJ1ZXJyZW90eXBlIDAuMTYifV0sInJvb3RmcyI6eyJ0eXBlIjoibGF5ZXJzIiwiZGlmZl9pZHMiOlsic2hhMjU2OjcwMmM2ZTdiNjk1MGQ2MjAyMjVlOWRkN2MxMzRmOTdiNTc4MTk4NTE5MjQ3OTEwYmYzNTIxMDA3ZDAwNzQ2YTAiXX0sIm9zIjoibGludXgiLCJhcmNoaXRlY3R1cmUiOiJhbWQ2NCJ9Cg=="
  },
  "layers": [
    {
      "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
      "digest": "sha256:5857029bddef1835b8500dbadef27f195bd9411dd35ec8d716ad2d1b666b8934",
      "size": 29777766
    }
  ]
}
(datalad-container) yoh@typhon:/tmp/test-containers3$ cat .datalad/environments/debian-slim/image/
blobs/      index.json  oci-layout  
(datalad-container) yoh@typhon:/tmp/test-containers3$ jq . < .datalad/environments/debian-slim/image/index.json 
{
  "schemaVersion": 2,
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:b9c08c0f9f56ee44aa0c1aceaa5388f652f5c8217bd1abd8a9ad8761cf0f3377",
      "size": 1021,
      "annotations": {
        "org.opencontainers.image.ref.name": "stable-slim",
        "org.datalad.container.image.source": "docker://debian:stable-slim"
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions