Skip to content

Kotlin implementation of the OCI Distribution client specification

License

Notifications You must be signed in to change notification settings

defenseunicorns/koci

koci

Kotlin implementation of the OCI Distribution client specification.

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
  • 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