OCI Registry As Storage

Related tags

Utilities oras-go
Overview

OCI Registry As Storage

🚧 This project is currently under active development. The API may and will change incompatibly from one commit to another. 🚧

GitHub Actions status Go Report Card GoDoc

ORAS

ORAS Go Library

Using the ORAS Go library, you can develop your own push/pull experience: myclient push artifacts.azurecr.io/myartifact:1.0 ./mything.thang

The package github.com/oras-project/oras-go/pkg/oras can quickly be imported in other Go-based tools that wish to benefit from the ability to store arbitrary content in container registries.

ORAS Go Library Example

Source

package main

import (
	"context"
	"fmt"

	"github.com/oras-project/oras-go/pkg/content"
	"github.com/oras-project/oras-go/pkg/oras"

	"github.com/containerd/containerd/remotes/docker"
	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

func check(e error) {
	if e != nil {
		panic(e)
	}
}

func main() {
	ref := "localhost:5000/oras:test"
	fileName := "hello.txt"
	fileContent := []byte("Hello World!\n")
	customMediaType := "my.custom.media.type"

	ctx := context.Background()
	resolver := docker.NewResolver(docker.ResolverOptions{})

	// Push file(s) w custom mediatype to registry
	memoryStore := content.NewMemoryStore()
	desc := memoryStore.Add(fileName, customMediaType, fileContent)
	pushContents := []ocispec.Descriptor{desc}
	fmt.Printf("Pushing %s to %s...\n", fileName, ref)
	desc, err := oras.Push(ctx, resolver, ref, memoryStore, pushContents)
	check(err)
	fmt.Printf("Pushed to %s with digest %s\n", ref, desc.Digest)

	// Pull file(s) from registry and save to disk
	fmt.Printf("Pulling from %s and saving to %s...\n", ref, fileName)
	fileStore := content.NewFileStore("")
	defer fileStore.Close()
	allowedMediaTypes := []string{customMediaType}
	desc, _, err = oras.Pull(ctx, resolver, ref, fileStore, oras.WithAllowedMediaTypes(allowedMediaTypes))
	check(err)
	fmt.Printf("Pulled from %s with digest %s\n", ref, desc.Digest)
	fmt.Printf("Try running 'cat %s'\n", fileName)
}
Comments
  • Missing manifest annotations.

    Missing manifest annotations.

    I don't know if I'm doing anything wrong, but I've used oras.WithManifestAnnotations() to push my artefact with some metadata, that worked well because if I curl the repo directly I see it there:

    $ curl -sL -u"user:pass" https://my-repo/v2/oso-plugins/manifests/oso-legacy | jq .
    {
      "schemaVersion": 2,
      "config": {
        "mediaType": "application/vnd.unknown.config.v1+json",
        "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
        "size": 2
      },
      "layers": [
        {
          "mediaType": "application/vnd.oci.image.layer.v1.tar",
          "digest": "sha256:8e985dc2c81bd5e8bfafb2858b9a9cb420c02a29d5a96f32eb00f5850556410a",
          "size": 755,
          "annotations": {
            "hook": "chmod +x ~/.oso/bin/oso-legacy",
            "org.opencontainers.image.title": "oso-legacy"
          }
        }
      ],
      "annotations": {
        "caveats": "to get auto-completions do this...",
        "description": "a bridge to the past",
        "shortDescription": "a plugin"
      }
    }
    

    But then when I pull it using desc, artefacts, err := oras.Pull(...) I can loop through the artefacts and get the annotations from each of them, but desc.Annotations is empty...

    The result of fmt.Println(desc.Annotations) is:

    Annotations: map[]
    
    v1 
    opened by luisdavim 30
  • Feat: Adding discoverer & example copy command

    Feat: Adding discoverer & example copy command

    This is the minimum viable product for the recursive copy/discover. I restored some files that were removed for pkg/oras/copy.go namely pull.go, since it has the semantics I'm looking for in this implementation, and added back the ProviderIngester interface.

    Signed-off-by: Julius Liu [email protected]

    opened by juliusl 25
  • `Transfer-Encoding: chunked` responses fail

    `Transfer-Encoding: chunked` responses fail

    Hello,

    I have been working on a project using the oras client (v2) against a repository hosted on ECR. We are storing an artifact with quite a lot of individual items (431 layers on the final manifest), which seems to cause ECR to chunk the response:

    # REPO contains the API of the target repository, private in this case
    ❯ curl -X GET -I --user "AWS:$(aws ecr get-login-password)" "${REPO}/manifests/latest"
    HTTP/1.1 200 OK
    Content-Type: application/vnd.oci.image.manifest.v1+json
    Docker-Distribution-Api-Version: registry/2.0
    Sizes:
    Date: Fri, 23 Sep 2022 09:14:00 GMT
    Transfer-Encoding: chunked
    

    The library currently explicitly checks for net/http.Response.ContentLength when validating the response, which is for these cases -1 and errors out: GET "${REPO}/manifests/latest": unknown response Content-Length, coming from registry/remote/repository.go

    I tried to replicate the behavior with the open source registry image, but even with a manifest with >10000 layers it responds non-chunked, so this might unfortunately be a bit annoying to replicate fully locally.

    bug AWS ECR 
    opened by lbjarre 22
  • Copy API

    Copy API

    This is an implementation of the "copy API". It solves several outstanding issues with the oras go library, with the intent of making it easier to work with, easier to understand, and more flexible.

    • Instead of Push and Pull, there is a single func Copy(). You copy from a ref in one Target to a ref (which may be the same as the first) in another Target
    • Target is suspiciously like remotes.Resolver because, as of now, that is precisely what it is. That is likely to change going forward

    This makes the interface much simpler to use and understand.

    This also opens possibilities like using different URLs or different authentication for different targets. You treat a local bunch of files as a target (from or to) just like a remote registry. Memory, file, registry, oci layout, all are just targets.

    The directory examples/advanced/ contains some good examples of how this is used.

    opened by deitch 18
  • Proper naming for UpEdges/DownEdges methods

    Proper naming for UpEdges/DownEdges methods

    Currently, we have an UpEdges method which returns the nodes directly pointing to the current node, and a DownEdges method which returns the nodes directly pointed by the current node. However, the UpEdges / DownEdges names may not be appropriate, and we are considering using other names.

    The current candidates are:

    • UpEdges / DownEdges:
      • Pros: Currently being used.
      • Cons: There is no academic terms for "up edges" and "down edges" of a Directed Acyclic Graph (DAG).
    • Referrers / References:
      • Pros: Closer to the domain.
      • Cons: The potential concern is that we have too many things named references.
    • Parents / Children:
      • Pros: Straightforward.
      • Cons: DAGs are not trees.

    Let's brainstorm for more names and do a vote!

    documentation 
    opened by Wwwsylvia 17
  • [WIP] Re-tooling remotes resolver dependency

    [WIP] Re-tooling remotes resolver dependency

    I am trying to decouple dependencies on containerd, to make the oras-go pkg a bit friendlier to take a dependency on. I'm starting on the resolver code since it is in the center of everything. And I plan on working my way towards images next.

    For implementing the resolver I am following the oci-spec line by line, hence my notes in http.go (don't want to miss details). For auth, I started out with some basic oauth2 flows so that I can work without having to install docker. I haven't put much thought into anything beyond that just yet.

    I have not started debugging this PR, but I'm anxious about getting too far ahead of myself so I wanted to put it up early. I'm pretty happy with the direction it's headed in so far, but I am open to discuss.

    opened by juliusl 15
  • Feat: Adding discoverer

    Feat: Adding discoverer

    This adds the discoverer interface back to the main branch. Some caveats:

    • Needed to port over some docker code but plan on removing with my re-tooling work

    @sajayantony @shizhMSFT

    opened by juliusl 14
  • fix: oras pull error `empty response Docker-Content-Digest`

    fix: oras pull error `empty response Docker-Content-Digest`

    See https://github.com/oras-project/oras-go/issues/225 for details, but here's the tldr:

    % oras pull 080565210187.dkr.ecr.us-west-2.amazonaws.com/my.repo:my.tag
    Error: GET "https://080565210187.dkr.ecr.us-west-2.amazonaws.com/v2/my.repo/manifests/my.tag": empty response Docker-Content-Digest
    

    The expected outcome (what this PR claims to fix):

    % oras pull 080565210187.dkr.ecr.us-west-2.amazonaws.com/my.repo:my.tag
    Downloading 3cd22ae067a3
    Downloaded empty artifact
    Pulled 080565210187.dkr.ecr.us-west-2.amazonaws.com/my.repo:my.tag
    Digest: sha256:32aef68c20b6f25d69ecbc2f3f98e28f6f6fdacade75ee879459b61f610583f0
    

    Resolves #225

    opened by nima 13
  • Update Example

    Update Example

    Once we have the least code working, we should update the examples so that people can try themselves.

    Examples (originally from @sajayantony 's list):

    • [x] Download Manifest
    • [x] Download a Blob given the digest
    • [x] Put Manifest
    • [x] Create manifest with Annotation
    • [x] Upload Blob
    • [x] Upload Manifest with blob
    • [x] Copy Artifact
    • [x] Insecure TLS / Plain HTTP
    • [ ] HTTP Client Configuration
    opened by shizhMSFT 11
  • fix: avoid panic from releasing unacquired semaphore

    fix: avoid panic from releasing unacquired semaphore

    When using this pattern:

    eg, egCtx := errgroup.WithContext(ctx)
    for /* ... */ {
    	limiter.Acquire(ctx, 1)
    	eg.Go(func() error {
    		defer limiter.Release(1)
    		// ...
    		return nil
    	})
    }
    if err := eg.Wait(); err != nil {
    	return err
    }
    

    If ctx is cancelled then Acquire may return an error, which will then cause Release to panic after it's called more times than the semaphore was successfully acquired.

    This change uses the SetLimit functionality which has been added to errgroup.Group and provides a small wrapper around it in the internal/syncutil package to improve the ergonomics of its usage.

    opened by abursavich 10
  • feat: improve the error message if non-distributable(foreign) layer is not supported

    feat: improve the error message if non-distributable(foreign) layer is not supported

    Some artifacts(e.g., Windows base images) contain layers whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included.

    For now, oras.Copy and oras.Fetch will fail if the target artifact contains an non-distributable(foreign) layer since the layer blob doesn't exist in the remote registry. We should

    1. By default skip blob copying if a layer is non-distributable
    2. Provide option to enforce copying a non-distributable layer and follows the foreign link for fetching
    enhancement 
    opened by qweeah 9
  • Enable the dependabot for oras-go v1 branch

    Enable the dependabot for oras-go v1 branch

    Per discussion in the #oras slack channel, we need to enable the dependabot for oras-go v1 branch. It can help to bump up the dependencies for oras-go v1 automatically.

    @lucacome Would you be able to help with this configuration?

    v1 
    opened by FeynmanZhou 0
  • Referrers API support for OCI Layout

    Referrers API support for OCI Layout

    opened by shizhMSFT 1
  • Enhance `content/oci` for content discovery

    Enhance `content/oci` for content discovery

    Given an OCI layout, the current implementation of oras-go has no means to discover content so that users cannot copy or extract any information from the OCI layout unless they know the entry point.

    Proposal:

    1. Refactor https://github.com/oras-project/oras-go/blob/258bfba7524104a5a76a597184ca0d038f4e3086/registry/repository.go#L51-L66 of the registry.Repository interface as TagFinder.
    2. Let content/oci.Store and content/oci.ReadOnlyStore implement TagFinder.
    enhancement 
    opened by shizhMSFT 0
  • Vote for ORAS-go 1.2.2 release:

    Vote for ORAS-go 1.2.2 release:

    Hi team @oras-project/oras-go-maintainers ,

    Considering ORAS-go v2 is still experimental, ORAS-go v1 is stable and will be maintained by the ORAS community until ORAS v2 GA.

    Currently, ORAS-go v1 is not under active development, the ORAS community might only cut new releases to include necessary bug fixes.

    There were four PRs merged since the ORAS-go 1.2.1 release:

    image

    Meanwhile, @lucacome also requested a new patch release of v1. So I want to request a new release v1.2.2.

    We need at least 4 approvals from 6 @oras-project/oras-go-maintainers to vote for releasing and cutting the tag v1.2.1 based on the v1 branch.

    • [ ] Avi Deitcher (@deitch)
    • [x] Josh Dolitsky (@jdolitsky)
    • [ ] Sajay Antony (@sajayantony)
    • [x] Shiwei Zhang (@shizhMSFT)
    • [x] Steve Lasker (@stevelasker)
    • [ ] Sylvia Lei (@Wwwsylvia)

    Please respond LGTM or REJECT (with reasoning).

    opened by FeynmanZhou 6
  • Remove `@main` from the godoc URLs in README

    Remove `@main` from the godoc URLs in README

    Such as https://github.com/oras-project/oras-go/blob/7dcd0973b194e89a51ac02bec91354fcba1f881a/README.md?plain=1#L29 and https://github.com/oras-project/oras-go/blob/7dcd0973b194e89a51ac02bec91354fcba1f881a/README.md?plain=1#L41-L44

    documentation 
    opened by Wwwsylvia 0
Releases(v1.2.2)
  • v1.2.2(Dec 23, 2022)

    What's Changed

    • BREAKING CHANGE: Update to Go 1.18 by @lucacome in https://github.com/oras-project/oras-go/pull/154
    • Bump containerd and opencontainers/image-spec by @lucacome in https://github.com/oras-project/oras-go/pull/378
    • Bump crypto and sync by @lucacome in https://github.com/oras-project/oras-go/pull/381
    • Bump docker by @lucacome in https://github.com/oras-project/oras-go/pull/382
    • Bump distribution by @lucacome in https://github.com/oras-project/oras-go/pull/386
    • Bump logrus and testify by @lucacome in https://github.com/oras-project/oras-go/pull/387

    Full Changelog: https://github.com/oras-project/oras-go/compare/v1.2.1...v1.2.2

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.6(Dec 12, 2022)

    New Features

    Bug Fixes

    • fix #368: Range query is attempted for fetching blob from registries without range query support
    • fix #374: Repository.FetchReference() fails when registry responds with chunked transfer encoding
    • fix #383: oras.Copy() may fail when the option FindSuccessors finds successors from external sources

    Other Changes

    • BREAKING CHANGE: Change the type of Concurrency options from int64 to int
    • Improve code quality (#363, #364)
    • Improve the readability of GoDoc

    What's Changed

    • doc: fix testable example name by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/365
    • fix: avoid copying Repository mutex state by @abursavich in https://github.com/oras-project/oras-go/pull/364
    • fix: attempt range query only if server explicitly supports by @shizhMSFT in https://github.com/oras-project/oras-go/pull/369
    • doc: make the default options displayed next to the option type on godoc by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/372
    • fix: avoid panic from releasing unacquired semaphore by @abursavich in https://github.com/oras-project/oras-go/pull/363
    • refactor!: update the type of Concurrency options to int by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/376
    • fix: allow chunked responses via HEAD request fallback by @AaronFriel in https://github.com/oras-project/oras-go/pull/370
    • feat: support creating read-only OCI store from fs.FS by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/367
    • feat: support reading OCI layout from tarballs by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/379
    • feat: change foreign layer error message at repository.Fetch() by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/377
    • feat: skip foreign layers on oras.Copy by @shizhMSFT in https://github.com/oras-project/oras-go/pull/380
    • fix: use proxy when copying node with successors by @qweeah in https://github.com/oras-project/oras-go/pull/384
    • refactor: refactor OCI store to fully support Predecessors() and Resolve() by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/385

    New Contributors

    • @abursavich made their first contribution in https://github.com/oras-project/oras-go/pull/364
    • @AaronFriel made their first contribution in https://github.com/oras-project/oras-go/pull/370

    Full Changelog: https://github.com/oras-project/oras-go/compare/v2.0.0-rc.5...v2.0.0-rc.6

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.5(Nov 18, 2022)

    New Features

    Bug Fixes

    Other Changes

    • Improve the performance of using referrers tag schema when pushing and deleting manifest concurrently
    • Revise the documentation of registry.Reference

    Detailed Commits

    • feat!: add ReferrerFinder to Repository interface by @shizhMSFT in https://github.com/oras-project/oras-go/pull/357
    • fix: fix potential deadlock in oras.Copy by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/359
    • doc: revise doc of registry.Reference by @nima in https://github.com/oras-project/oras-go/pull/358
    • perf: improve the performance of using referrers tag schema by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/360

    Full Changelog: https://github.com/oras-project/oras-go/compare/v2.0.0-rc.4...v2.0.0-rc.5

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.4(Oct 31, 2022)

    New Features

    Bug Fixes

    • fix #303: Scrutinize references for digests posing as tags

    Other Changes

    • BREAKING CHANGE: Change the signature of Repository.Referrers()
    • BREAKING CHANGE: Merge oras.PackArtifact() into oras.Pack()
    • Improve error message on platform mismatch
    • Improve error message for Repository.FetchReference()
    • Increase test coverage
    • Check license header in Github workflow
    • Other minor fixes

    Detailed Commits

    • test: add interface tests for Repository, blobStore and manifestStore by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/313
    • fix: add missing license headers by @jasminetMSFT in https://github.com/oras-project/oras-go/pull/315
    • build: license header check in github workflows by @jasminetMSFT in https://github.com/oras-project/oras-go/pull/316
    • feat: add read and verify utility method by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/324
    • fix: fix data race in TagBytesN unit test by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/329
    • fix: improve oras manifest fetch --platform error message by @lizMSFT in https://github.com/oras-project/oras-go/pull/330
    • fix: fix 404 error message for manifestStore.FetchReference by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/331
    • fix: add nil checks for some functions by @jasminetMSFT in https://github.com/oras-project/oras-go/pull/327
    • feat!: support OCI artifact manifest with descriptor migration by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/334
    • fix: Scrutinize references for digests posing as tags by @nima in https://github.com/oras-project/oras-go/pull/326
    • refactor: optimize extended copy filters by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/335
    • Update image-spec to v1.1.0-rc2 by @sajayantony in https://github.com/oras-project/oras-go/pull/339
    • refactor: update implementation of Referrers API by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/340
    • refactor!: merge oras.PackArtifact() into oras.Pack() by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/343
    • feat: index referrers on manifest push by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/348
    • feat: index referrers on manifest delete by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/350
    • feat: include error code in error response by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/352
    • refactor: refactor functions related to querying referrers by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/353

    New Contributors

    • @jasminetMSFT made their first contribution in https://github.com/oras-project/oras-go/pull/315

    Full Changelog: https://github.com/oras-project/oras-go/compare/v2.0.0-rc.3...v2.0.0-rc.4

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.3(Sep 7, 2022)

    New Features

    Deprecation

    • BREAKING CHANGE Moved content.ErrSizeExceedLimit to errdef.ErrSizeExceedsLimit
    • BREAKING CHANGE Removed registry.ReferenceTagger
    • BREAKING CHANGE Removed registry/remote.Repository.TagReference()

    Bug Fixes

    • fix #225: Pulling from AWS ECR fails with error empty response Docker-Content-Digest
    • fix #294: Pushing artifacts to Google GAR fails with error Error PUT ... unexpected status code 400: Bad Request
    • fix potential security vulnerabilities: #289, #291

    Other Changes

    Detailed Commits

    • build: update support window to Go 1.18, 1.19 by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/270
    • refactor: Small refactor of reference module and tests by @nima in https://github.com/oras-project/oras-go/pull/279
    • fix: oras pull error empty response Docker-Content-Digest by @nima in https://github.com/oras-project/oras-go/pull/237
    • refactor!: add read-only interfaces by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/283
    • feat: add utility methods for creating and comparing OCI descriptors by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/281
    • fix: remove +json encoding from the default config media type by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/288
    • feat!: support oras.Fetch and oras.FetchBytes by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/282
    • feat: add a utility method for specifying static credentials by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/280
    • refactor: improve error message on platform mismatch in order to distinguish platform not found and manifest not found by @lizMSFT in https://github.com/oras-project/oras-go/pull/292
    • feat: Support oras.PushBytes and oras.TagBytes by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/293
    • fix: Revert "Upload empty blob when packing" by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/295
    • fix: Revert "fix: remove +json encoding from the default config media type" by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/297
    • fix: use a default value when Concurrency is not specified by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/296
    • feat!: Support specifying MaxMetadataBytes option for oras.Resolve and oras.Copy by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/299
    • feat: Repository.Manifest() now returns a ManifestStore by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/300
    • feat!: support oras.TagN by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/301
    • feat: implement ReferenceParser for manifestStore by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/305

    New Contributors

    • @nima made their first contribution in https://github.com/oras-project/oras-go/pull/279

    Full Changelog: https://github.com/oras-project/oras-go/compare/v2.0.0-rc.2...v2.0.0-rc.3

    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Oct 17, 2022)

    What's Changed

    • Implement Info, which will return metadata about the content available in the OCI store by @oanatmaria in https://github.com/oras-project/oras-go/pull/187
    • Bump docker/distribution to v2.8.1 by @mihaibuzgau in https://github.com/oras-project/oras-go/pull/276

    New Contributors

    • @oanatmaria made their first contribution in https://github.com/oras-project/oras-go/pull/187
    • @mihaibuzgau made their first contribution in https://github.com/oras-project/oras-go/pull/276

    Full Changelog: https://github.com/oras-project/oras-go/compare/v1.2.0...v1.2.1

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.2(Aug 12, 2022)

    New Features

    • Supports artifacts-spec v1.0.0-rc.2
    • Added new API content.ReadAll() to safely read fetched blobs
    • content/file.Store allows skipping unnamed blobs when pushing
    • oras.Copy() and oras.ExtendedCopy() support platform selection
    • oras.ExtendedCopy() supports filtering predecessors by artifact type and / or annotations using regular expressions

    Bug Fixes

    • fix #236: same content with different names will be skipped when being pushing to file store
    • fix #239: oras.Copy() may skip tagging if manifest blob already exists in the destination
    • fix #252: pushing blobs to ECR will fail

    Other Changes

    • Improved documentation
    • Migrated to codecov.io for code coverage reports
    • oras.Pack() packs empty config blob of size 0 bytes instead of {} (empty JSON object of size 2 bytes).

    Detailed Commits

    • Bug: oras.Copy() may skip tagging if manifest blob already exists in the destination by @m5i-work in https://github.com/oras-project/oras-go/pull/243
    • created pull blob example by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/234
    • added an example of copying artifact manifest by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/241
    • moved ReadAll and related functions to package Content by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/245
    • update artifact-spec to v1.0.0-rc.2 by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/251
    • Reuse post token for put when pushing blobs by @qweeah in https://github.com/oras-project/oras-go/pull/253
    • Migrate to codecov.io by @junczhuMSFT in https://github.com/oras-project/oras-go/pull/247
    • replaced io.ReadAll with content.ReadAll in examples by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/255
    • Added an example of using ExtendedCopy by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/248
    • Failed to download all the files in an artifact using oras.Copy() by @m5i-work in https://github.com/oras-project/oras-go/pull/256
    • fix: Fix runnable examples by @lizMSFT in https://github.com/oras-project/oras-go/pull/257
    • Allow skipping unnamed blobs when pushing to file store by @m5i-work in https://github.com/oras-project/oras-go/pull/254
    • Upload empty blob when packing by @m5i-work in https://github.com/oras-project/oras-go/pull/262
    • support filtering on annotation with regex by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/259
    • fix: fix typo in example test by @lizMSFT in https://github.com/oras-project/oras-go/pull/263
    • feat: Support platform selection on Copy by @lizMSFT in https://github.com/oras-project/oras-go/pull/244
    • added filtering by artifact type with regex by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/258
    • fix: added manifest parsing when annotation is not in the descriptor by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/266

    New Contributors

    • @junczhuMSFT made their first contribution in https://github.com/oras-project/oras-go/pull/247
    • @lizMSFT made their first contribution in https://github.com/oras-project/oras-go/pull/257

    Full Changelog: https://github.com/oras-project/oras-go/compare/v2.0.0-rc.1...v2.0.0-rc.2

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.1(Jul 7, 2022)

    Major Changes

    What's Changed

    • Update godoc link to main branch by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/198
    • migrate REVIEWING.md from ORAS-go to community by @FeynmanZhou in https://github.com/oras-project/oras-go/pull/194
    • Update Referrers API to match RC.1 by @m5i-work in https://github.com/oras-project/oras-go/pull/191
    • Clean up unused files by @shizhMSFT in https://github.com/oras-project/oras-go/pull/212
    • Filter referrers by artifact type by @m5i-work in https://github.com/oras-project/oras-go/pull/211
    • examples for the auth module by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/182
    • Add auth examples in README by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/216
    • Support last parameter for listing catalog and tags by @patrickzheng200 in https://github.com/oras-project/oras-go/pull/217
    • Update artifact spec to v1.0.0-rc.1 by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/222
    • added a refresh token example by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/219
    • Implement client feature for Discovery API by @m5i-work in https://github.com/oras-project/oras-go/pull/214
    • Check ORAS-Api-Version for referrers API by @m5i-work in https://github.com/oras-project/oras-go/pull/227
    • Add PackArtifact by @Wwwsylvia in https://github.com/oras-project/oras-go/pull/223
    • Skip version checking for pre-RC1 endpoint by @m5i-work in https://github.com/oras-project/oras-go/pull/229
    • Added Tag function to oras/registry.go by @patrickzheng200 in https://github.com/oras-project/oras-go/pull/226
    • Use annotation constant from artifact-spec by @m5i-work in https://github.com/oras-project/oras-go/pull/231
    • added one example for downloading artifact reference manifest by @wangxiaoxuan273 in https://github.com/oras-project/oras-go/pull/173

    New Contributors

    • @FeynmanZhou made their first contribution in https://github.com/oras-project/oras-go/pull/194
    • @m5i-work made their first contribution in https://github.com/oras-project/oras-go/pull/191

    Full Changelog: https://github.com/oras-project/oras-go/compare/v2.0.0-alpha...v2.0.0-rc.1

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-alpha(Jun 24, 2022)

    In version v2, ORAS Go library has been completely refreshed with:

    • More unified interfaces
    • Notably fewer dependencies
    • Higher test coverage
    • Better documentation

    Besides, ORAS Go v2 is now a registry client.

    Major Changes in v2

    • Moves content.FileStore to file.Store
    • Moves content.OCIStore to oci.Store
    • Moves content.MemoryStore to memory.Store
    • Provides SDK to interact with OCI-compliant and Docker-compliant registries
    • Supports Copy with more flexible options
    • Supports Extended Copy with options (experimental)
    • No longer supports docker.Login and docker.Logout (removes the dependency on docker); instead, provides authentication through auth.Client

    Documentation and examples are available at pkg.go.dev. Detailed migration guide are available at MIGRATION_GUIDE.md.

    New Contributors

    • @scottrigby made their first contribution in https://github.com/oras-project/oras-go/pull/74
    • @Wwwsylvia made their first contribution in https://github.com/oras-project/oras-go/pull/86
    • @sajayantony made their first contribution in https://github.com/oras-project/oras-go/pull/116
    • @qweeah made their first contribution in https://github.com/oras-project/oras-go/pull/117
    • @wangxiaoxuan273 made their first contribution in https://github.com/oras-project/oras-go/pull/145
    • @caniszczyk made their first contribution in https://github.com/oras-project/oras-go/pull/105
    • @patrickzheng200 made their first contribution in https://github.com/oras-project/oras-go/pull/186

    Full Changelog: https://github.com/oras-project/oras-go/compare/v0.5.0...v2.0.0-alpha

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jun 15, 2022)

    What's Changed

    • use io.ReadFull for ProviderWrapper in case of partial read by @raygecao in https://github.com/oras-project/oras-go/pull/142
    • Bump containerd to v1.6.4 by @lucacome in https://github.com/oras-project/oras-go/pull/151
    • Bump containerd to v1.6.6 by @lucacome in https://github.com/oras-project/oras-go/pull/160
    • Bump cobra to v1.4.0 by @lucacome in https://github.com/oras-project/oras-go/pull/167
    • Bump dependencies by @lucacome in https://github.com/oras-project/oras-go/pull/168
    • Implement Delete in the oci store content implementation by @viovanov in https://github.com/oras-project/oras-go/pull/174
    • Add a loginWithTLS function to V1 by @souleb in https://github.com/oras-project/oras-go/pull/171

    New Contributors

    • @raygecao made their first contribution in https://github.com/oras-project/oras-go/pull/142
    • @lucacome made their first contribution in https://github.com/oras-project/oras-go/pull/151
    • @souleb made their first contribution in https://github.com/oras-project/oras-go/pull/171

    Full Changelog: https://github.com/oras-project/oras-go/compare/v1.1.1...v1.2.0

    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Apr 12, 2022)

  • v1.1.0(Jan 12, 2022)

  • v1.1.0-rc3(Jan 11, 2022)

  • v1.1.0-rc2(Jan 7, 2022)

  • v1.1.0-rc1(Jan 7, 2022)

  • v1.0.0(Nov 19, 2021)

    First stable release!

    Going forward, all commits found in future v1.* releases will occur on the v1 branch.

    The v1 branch will favor API stability, dependency updates, and security patches.

    The main branch will be the home for new feature development, experiments, etc.

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Oct 21, 2021)

    Note: this version has breaking API changes! Upgrading from v0.4.0 to v0.5.0 will require code changes.

    For more information on the new API, please see https://github.com/oras-project/oras-go/pull/8. Docs will be updated soon.

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Jun 11, 2021)

  • v0.3.0(Jun 9, 2021)

  • v0.3.0-rc1(Jun 8, 2021)

  • v0.2.0(Jun 7, 2021)

  • v0.1.0(May 4, 2021)

Owner
OCI Registry As Storage (ORAS)
Tools and libraries to enable leveraging OCI registries for arbitrary artifacts
OCI Registry As Storage (ORAS)
πŸ€–πŸ€A tool to test and analyze storage and retrieval deal capability on the Filecoin network.

Dealbot A tool to test and analyze storage and retrieval deal capability on the Filecoin network. Getting Started Clone the repo and build: git clone

Filecoin 29 Sep 10, 2022
A pure Golang implementation of Rockchip rknand vendor storage interface.

go-rkvendorstorage A pure Golang implementation of Rockchip rknand vendor storage interface. Usage package main import ( "fmt" "github.com/jamesits

James Swineson 4 Nov 8, 2022
The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Oracle 24 Sep 27, 2022
An Oracle Cloud (OCI) Pulumi resource package, providing multi-language access to OCI

Oracle Cloud Infrastructure Resource Provider The Oracle Cloud Infrastructure (OCI) Resource Provider lets you manage OCI resources. Installing This p

Pulumi 14 Dec 2, 2022
Versioned model registry suitable for temporary in-training storage and permanent storage

Cogment Model Registry Cogment is an innovative open source AI platform designed to leverage the advent of AI to benefit humankind through human-AI co

Cogment 2 May 26, 2022
registry-tools: Prints image digest from a registry

registry-tools: Prints image digest from a registry

Rashed K 1 Dec 23, 2021
A REST API for the DN42 registry, written in Go, to provide a bridge between interactive applications and the registry.

dn42regsrv A REST API for the DN42 registry, written in Go, to provide a bridge between interactive applications and registry data. A public instance

Simon Marsh 0 Apr 21, 2022
πŸ€– Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) container registry

✨ Prune container images in a CLI way ✨ Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) Container Registry Getting Started | Des

> CI Monk 1 Dec 15, 2022
The Container Storage Interface (CSI) Driver for Fortress Block Storage This driver allows you to use Fortress Block Storage with your container orchestrator

fortress-csi The Container Storage Interface (CSI) Driver for Fortress Block Storage This driver allows you to use Fortress Block Storage with your co

Fortress 0 Jan 23, 2022
Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.

Vilicus Table of Contents Overview How does it work? Architecture Development Run deployment manually Usage Example of analysis Overview Vilicus is an

Ederson Brilhante 80 Dec 6, 2022
Podman: A tool for managing OCI containers and pods

Podman: A tool for managing OCI containers and pods Podman (the POD MANager) is a tool for managing containers and images, volumes mounted into those

Containers 16.4k Jan 1, 2023
A tool that facilitates building OCI images

Buildah - a tool that facilitates building Open Container Initiative (OCI) container images The Buildah package provides a command line tool that can

Containers 5.9k Jan 3, 2023
OCI Image Encryption Package

imgcrypt image encryption library and command line tool Project imgcrypt is a non-core subproject of containerd. The imgcrypt library provides API exe

containerd 246 Jan 5, 2023
Handy little CLI for interacting with OCI data

oci-tool Handy little CLI for interacting with OCI data Installation go get github.com/csweichel/oci-tool I use Gitpod for developing this tool; you s

Christian Weichel 11 May 17, 2022
OCI transport plugin for apt-get (i.e., apt-get over ghcr.io)

apt-transport-oci: OCI transport plugin for apt-get (i.e., apt-get over ghcr.io) apt-transport-oci is an apt-get plugin to support distributing *.deb

Akihiro Suda 88 Nov 1, 2022
Simple, rootless, "FROM scratch" OCI image builder

zeroimage zeroimage some-program is like building the following Docker image: FROM scratch COPY some-program /some-program ENTRYPOINT ["/some-program"

Alex Hamlin 2 Jun 26, 2022
OCI drive, available from home

OCI Drive ... use your storage with Oracle Object Store Quick Start Make sure you have the Object Storage, bucket and you know the compartment id wher

Michal Conos 1 Nov 10, 2021
Cache oci login token for kubectl

oci-token-cache Cache oci login token. This command cache oci login token into ~/.oci/token-cache.json and re-use for kubectl. Usage Currently, your ~

mattn 1 Nov 20, 2021
Executes an OCI image using firecracker.

oci-image-executor Executes an OCI image using Firecracker. Logs from the executed process (both stdout and stderr) are sent to stdout. Logs from the

CodeCrafters 2 Dec 28, 2022
Docker for Your ML/DL Models Based on OCI Artifacts

English | δΈ­ζ–‡ ORMB is an open-source model registry to manage machine learning model. ORMB helps you manage your Machine Learning/Deep Learning models

Klever 393 Dec 30, 2022