Skip to content

defenseunicorns/koci

koci

"kay oh see eye"

Kotlin implementation of the OCI Distribution client specification.

Import

com.defenseunicorns.koci

Grab from GitHub packages or Maven Central

Basic Usage

// 0. Create a file store
val store = runBlocking { Layout.create("/tmp/koci-store") }.getOrThrow()

// 1. Connect to a remote repository
val repo = Registry("https://public.ecr.aws").repo("ubuntu/redis")

// 2. Copy from the remote repository to the file store
val tag = "latest"

repo.pull(tag, store).collect{ prog ->
    println("$prog% done")
}

Auth

Pull

Distribution specification

Push

Distribution specification

  • Push blobs
    • Resumable uploads
    • Single PUT request if content < OCI-Chunk-Min-Length or 5MB if unset. Chunked upload otherwise
    • Cross-repository blob mounting
  • Push + tag manifests/indexes
  • Referrers API

Store

Layout specification

Support for SHA-256 and SHA-512 hashing algorithms.

Concurrency

Changes to the concurrency API of koci are currently subject to change at any time.

For now, it is best to run operations that could interfere (images sharing layers) sequentially.

Contributing

See CONTRIBUTING.md.

Code of Conduct

See CODE_OF_CONDUCT.md.

Special Thanks

About

Kotlin implementation of the OCI Distribution client specification

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 5

Languages