OCI
View SourceAn OCI (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.
Features
- Full OCI Distribution Specification V2 compliance
- Pluggable storage backend
- Configurable authentication
- Easy integration with Phoenix applications
- Support for Docker and OCI image formats
- Compatible with Docker CLI and ORAS tools
Installation
The package can be installed by adding oci
to your list of dependencies in mix.exs
:
def deps do
[
{:oci, "~> 0.1.0"}
]
end
Usage
Basic Phoenix Integration
# Example router.ex configuration
# TODO: Add router configuration example
Docker CLI Interaction
# Example Docker CLI commands
# TODO: Add Docker CLI examples
ORAS CLI Interaction
# Example ORAS CLI commands
# TODO: Add ORAS CLI examples
Custom Storage Adapter
# Example storage adapter implementation
# TODO: Add storage adapter example
Custom Authentication
# Example authentication implementation
# TODO: Add authentication example
Configuration
The following configuration options are available:
# Example config.exs configuration
# TODO: Add configuration examples
Development
Running Tests
mix test
Running Tests in Watch Mode
To automatically run tests when files change:
mix test.watch
Running Credo
mix credo
Running Dialyzer
mix dialyzer
Running Documentation Generation
mix docs
Running Full QA Suite
To run all quality assurance checks (tests, credo, dialyzer, and docs generation):
mix qa
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Run the QA suite to ensure quality (
mix qa
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Note: Before submitting a PR, please ensure all QA checks pass by running mix qa
. This will run:
- Unit tests
- Code style checks (Credo)
- Static type checking (Dialyzer)
- Documentation generation
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.