Shoulder.dev Logo Shoulder.dev

Testing Container Images with OCI Distribution

Scenario: A developer, Alice, is responsible for managing container images for her organization. She wants to ensure that the images are tested thoroughly before they are distributed to production. OCI Distribution provides a way to test container images using manifest lists and media types. In this example, we will guide Alice through the process of creating test manifests and validating images using OCI Distribution.

Prerequisites:

  • Familiarity with container images and OCI Distribution
  • A working understanding of Go programming language
  • Access to the OCI Distribution codebase

Codebase Files and Directories:

  • cmd/
  • digest/
  • main.go
  • registry/
  • config-cache.yml
  • config-dev.yml
  • config-example.yml
  • main.go
  • registry-api-descriptor-template/
  • main.go
  • configuration/
  • configuration.go
  • configuration_test.go
  • configuration/parser.go
  • configuration/parser_test.go
  • digestset/
  • deprecated.go
  • dockerfiles/
  • authors.Dockerfile
  • docs.Dockerfile
  • git.Dockerfile
  • lint.Dockerfile
  • vendor.Dockerfile
  • docs/
  • content/
  • about/
  • recipes/
  • spec/
  • storage-drivers/
  • _index.md
  • data/
  • menu/
  • i18n/
  • en.yaml
  • layouts/
  • _default/
  • static/
  • favicon/
  • images/
  • brand.svg
  • custom.css
  • themes/
  • hugo-geekdoc/
  • dockerhub.md
  • hugo.yaml
  • health/
  • api/
  • api.go
  • api_test.go
  • checks/
  • checks.go
  • checks_test.go
  • doc.go
  • health.go
  • health_test.go
  • internal/
  • client/
  • auth/
  • transport/
  • blob_writer.go
  • blob_writer_test.go
  • errors.go
  • errors_test.go
  • repository.go
  • repository_test.go
  • dcontext/
  • context.go
  • doc.go
  • http.go
  • http_test.go
  • logger.go
  • trace.go
  • trace_test.go
  • util.go
  • version.go
  • version_test.go
  • requestutil/
  • util.go
  • util_test.go
  • manifest/
  • manifestlist/
  • manifestlist.go
  • manifestlist_test.go
  • ocischema/
  • builder.go
  • builder_test.go
  • index.go
  • index_test.go
  • manifest.go
  • manifest_test.go
  • schema2/
  • builder.go
  • builder_test.go
  • manifest.go
  • manifest_test.go
  • doc.go
  • versioned.go
  • metrics/
  • prometheus.go
  • notifications/
  • bridge.go
  • bridge_test.go
  • endpoint.go
  • event.go
  • event_test.go
  • http.go
  • http_test.go
  • listener.go
  • listener_test.go
  • metrics.go
  • metrics_test.go
  • sinks.go
  • sinks_test.go
  • project/
  • dev-image/
  • Dockerfile
  • hooks/
  • README.md
  • configure-hooks.sh
  • pre-commit
  • registry/
  • api/
  • errcode/
  • v2/
  • auth/
  • htpasswd/
  • silly/
  • token/
  • handlers/
  • api_test.go
  • app.go
  • app_test.go
  • basicauth.go
  • blob.go
  • blobupload.go
  • catalog.go
  • context.go
  • health_test.go
  • helpers.go
  • hmac.go
  • hmac_test.go
  • hooks.go
  • mail.go
  • manifests.go
  • tags.go
  • listener/
  • listener.go
  • middleware/
  • registry/
  • repository/
  • proxy/
  • scheduler/
  • proxyauth.go
  • proxyblobstore.go
  • proxyblobstore_test.go
  • proxymanifeststore.go
  • proxymanifeststore_test.go
  • proxymetrics.go
  • proxyregistry.go
  • proxytagservice.go
  • proxytagservice_test.go
  • storage/
  • cache/
  • driver/
  • blob_test.go
  • blobserver.go
  • blobstore.go
  • blobwriter.go
  • blobwriter_nonresumable.go
  • blobwriter_resumable.go
  • catalog.go
  • catalog_test.go
  • doc.go
  • error.go
  • filereader.go
  • filereader_test.go
  • garbagecollect.go
  • garbagecollect_test.go
  • io.go
  • linkedblobstore.go
  • linkedblobstore_test.go
  • manifestlisthandler.go
  • manifeststore.go
  • manifeststore_test.go
  • ociindexhandler.go
  • ocimanifesthandler.go
  • ocimanifesthandler_test.go
  • paths.go
  • paths_test.go
  • purgeuploads.go
  • purgeuploads_test.go
  • registry.go
  • schema2manifesthandler.go
  • schema2manifesthandler_test.go
  • tagstore.go
  • tagstore_test.go
  • vacuum.go
  • doc.go
  • registry.go
  • registry_test.go
  • root.go
  • releases/
  • README.md
  • v2.5.0-changelog.txt
  • v2.6.0-changelog.txt
  • v2.7.0.toml
  • v3.0.0.toml
  • tests/
  • conf-e2e-cloud-storage.yml
  • conf-local-cloud.yml
  • docker-compose-e2e-cloud-storage.yml
  • docker-compose-storage.yml
  • push.sh
  • testutil/
  • handler.go
  • manifests.go
  • push.go
  • tarfile.go
  • tracing/
  • exporter.go
  • exporter_test.go
  • loggerwriter.go
  • tracing.go
  • vendor/
  • cloud.google.com/
  • cloud.google.com/go/
  • github.com/
  • github.com/AdaLogics/
  • github.com/Azure/
  • github.com/AzureAD/
  • github.com/aws/
  • github.com/beorn7/
  • github.com/bshuster-repo/
  • github.com/cenkalti/
  • github.com/cespare/
  • github.com/coreos/
  • github.com/cyphar/
  • github.com/davecgh/
  • github.com/dgryski/
  • github.com/distribution/
  • github.com/docker/
  • github.com/felixge/
  • github.com/go-jose/
  • github.com/go-logr/
  • github.com/golang/
  • github.com/golang-jwt/
  • github.com/google/
  • github.com/google