Skip to main content
Version: 1.2

Go

Source code: github.com/oras-project/oras-go

Introduction

The ORAS Go client library provides the ability to replicate artifacts between different Targets.
Furthermore, the version v2 is a registry client conforming image-spec v1.1.0-rc6 and distribution-spec v1.1.0-rc4.

Using the ORAS Go client library, you can develop your own registry client:

myclient push artifacts.example.com/myartifact:1.0 ./mything.thang

Usage

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

  1. Get the oras.land/oras-go/v2 package
go get oras.land/oras-go/v2
  1. Import and use the v2 package
import "oras.land/oras-go/v2"
  1. Run
go mod tidy

The API documentation and examples are available at pkg.go.dev.

Quick Start

Push files to a remote repository

See this example.

Pull files from a remote repository

See this example.

Pull a docker or OCI image from a remote repository

See this example.

Pull an Image using the Docker credential store

See this example.