Skip to content

Repository files navigation

oci-distribution-api-hs

Small library implementing the OCI Distribution Spec API.

Endpoints implemented

Only a subset of endpoints are currently implemented. See OpenContainerImage.Registry

  • end-2 getImageManifest
  • end-3 withBlobFromDigest

Minimal example

See example program oci-read-one-layer.

Connecting the example program to an Amazon ECR private registry can look like:

export AWS_REGION=us-east-2
export AWS_ACCOUNT_ID=123123123123
export ECR_PASS=$(aws ecr get-login-password --region "$AWS_REGION")
stack run oci-read-one-layer -- \
  --baseUrl "https://AWS:${ECR_PASS}@${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com" \
  --manifest YOUR_NAMIFEST_NAME_HERE \
  --ref YOUR_MANIFEST_REF_HERE \
  --layer YOUR_LAYER_TITLE_HERE

This performs the requisite auth flow for requests.

About

Read an OCI image from a given HTTP endpoint

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages