{"id":32166022,"url":"https://github.com/massdriver-cloud/oci","last_synced_at":"2026-02-18T22:02:00.641Z","repository":{"id":295123182,"uuid":"989263881","full_name":"massdriver-cloud/oci","owner":"massdriver-cloud","description":"A Plug-based implementation of the OCI Distribution Specification (v2) registry server for Elixir applications. Provides a compliant HTTP API for container image distribution, supporting pull, push, and management operations.","archived":false,"fork":false,"pushed_at":"2025-06-13T08:52:03.000Z","size":2220,"stargazers_count":7,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-15T20:50:59.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/massdriver-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-23T19:10:41.000Z","updated_at":"2026-01-29T02:58:36.000Z","dependencies_parsed_at":"2025-05-30T19:31:09.293Z","dependency_job_id":null,"html_url":"https://github.com/massdriver-cloud/oci","commit_stats":null,"previous_names":["massdriver-cloud/oci"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/massdriver-cloud/oci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Foci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Foci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Foci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Foci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/massdriver-cloud","download_url":"https://codeload.github.com/massdriver-cloud/oci/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Foci/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-21T15:01:59.183Z","updated_at":"2026-02-18T22:02:00.636Z","avatar_url":"https://github.com/massdriver-cloud.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OCI\n\n![OCI Plug Logo](assets/logo.png)\n\n[![Hex.pm](https://img.shields.io/hexpm/v/oci.svg)](https://hex.pm/packages/oci)\n[![Hex.pm](https://img.shields.io/hexpm/dt/oci.svg)](https://hex.pm/packages/oci)\n[![Hex.pm](https://img.shields.io/hexpm/l/oci.svg)](https://hex.pm/packages/oci)\n[![CI](https://github.com/massdriver-cloud/oci/actions/workflows/ci.yml/badge.svg)](https://github.com/massdriver-cloud/oci/actions/workflows/ci.yml)\n[![Credo](https://img.shields.io/badge/Credo-Enabled-brightgreen)](https://github.com/rrrene/credo)\n\nAn [OCI](https://opencontainers.org/) (Open Container Initiative) compliant V2 registry server implementation for Elixir. This library provides a plug-based solution that can be integrated into any Elixir web application, with configurable storage and authentication adapters.\n\n**The included adapters are nowhere near production-ready. Make sure to implement your own before you go and have a bad time.**\n\nThis library is under heavy active development as we extract it from the [Massdriver](https://massdriver.cloud) codebase. `0.0.x` will have many breaking changes.\n\n## Features\n\n- Full OCI Distribution Specification V2 compliance\n- Pluggable storage backend\n- Configurable authentication\n- Easy integration with Phoenix applications\n- Support for Docker and OCI image formats\n- Compatible with Docker CLI and ORAS tools\n- Support for various repository naming conventions (`nginx`, `hexpm/elixir`, `big-corp/big-team/big-project`)\n\n## Repository Naming\n\nThis registry supports the standard OCI repository naming convention with strict `namespace/name`, `org/team/project`, or whatever wild ass `/` party you can dream up.\n\n- ✅ `myapp` - Single-level names\n- ✅ `myorg/myapp` - Standard namespace/name format\n- ✅ `org/team/project` - Multi-level namespaces\n- IT CAN JUST KEEP GOING (I THINK)\n\n## Installation\n\nThe package can be installed by adding `oci` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:oci, \"~\u003e 0.0.3\"}\n  ]\nend\n```\n\n## Usage\n\n### Basic Phoenix Integration\n\nSee an example in [the test setup](./test/support/router.ex).\n\n**config/config.ex**\n\n```elixir\nconfig :oci,\n  max_manifest_size: 4 * 1024 * 1024,\n  max_blob_upload_chunk_size: 10 * 1024 * 1024,\n  enable_blob_deletion: true,\n  enable_manifest_deletion: true,\n  repo_name_pattern: ~r/^([a-z0-9]+(?:[._-][a-z0-9]+)*)(\\/[a-z0-9]+(?:[._-][a-z0-9]+)*)*$/\n  storage: [\n    adapter: OCI.Storage.Local,\n    config: [\n      path: \"./tmp/\"\n    ]\n  ]\n```\n\n**endpoint.ex**\n```elixir\ndefmodule Endpoint do\n  @moduledoc false\n  use Phoenix.Endpoint, otp_app: :oci\n\n  plug(Plug.Parsers,\n    parsers: [OCI.Plug.Parser, :json], # \u003c- stick this bad boi in here. It'll full body read blob uploads and parse/digest manifests.\n    pass: [\"*/*\"],\n    json_decoder: Jason,\n    length: 20_000_000\n  )\n\n  plug(TestRegistryWeb.Router)\nend\n```\n\n**router.ex:**\n\n```elixir\nuse Phoenix.Router\nimport OCI.PhoenixRouter\n\nscope \"/v2\" do\n  forward(\"/\", OCI.Plug, [])\nend\n```\n\n### ORAS CLI Interaction\n\n```bash\n# Push an artifact\noras push localhost:5000/myorg/myapp:latest ./my-artifact.txt\n\n# Pull an artifact\noras pull localhost:5000/myorg/myapp:latest\n```\n\n### Docker CLI Interaction\n\n```bash\n# Pull an image\ndocker pull localhost:5000/myorg/myapp:latest\n\n# Push an image\ndocker push localhost:5000/myorg/myapp:latest\n\n# List tags\ncurl -X GET http://localhost:5000/v2/myorg/myapp/tags/list\n```\n\n### Custom Storage Adapter\n\n**TODO** See [adapter](./lib/oci/storage/adapter.ex) and [local fs example](./lib/oci/storage/local.ex)\n\n### Custom Authentication\n\n**TODO** See [adapter](./lib/oci/auth/adapter.ex) and [basic/static example](./lib/oci/auth/static.ex)\n\n## Development\n\n### Running Tests\n\nThis will run basic plug tests and the [conformance suite](./test/support/conformance_suite.ex) against a phoenix endpoint.\n\n```bash\nmix test\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Run the QA suite to ensure quality (`mix qa`)\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create new Pull Request\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n## References\n\n- [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec)\n- [Docker Registry HTTP API V2](https://docs.docker.com/registry/spec/api/)\n- [ORAS CLI](https://oras.land/cli/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmassdriver-cloud%2Foci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmassdriver-cloud%2Foci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmassdriver-cloud%2Foci/lists"}