Dockyard is an OCI (Open Container Initiative) compliant container registry implementation written in Go. It provides a lightweight, multi-tenant Docker registry server with support for projects and repositories.
- OCI Compliant: Implements the OCI Distribution Specification for container image storage
- Multi-tenant Support: Built-in tenant isolation with project and repository organization
- Flexible Storage: Configurable database and cache backends
- In-memory database (default)
- In-memory cache (default)
- Redis cache support
- REST API: Administrative API for tenant management and health checks
- Lightweight: Minimal dependencies and simple configuration
- Go 1.25 or higher
- (Optional) Redis for cache backend
- Clone the repository:
git clone https://github.com/The127/dockyard.git
cd dockyard- Build the application:
go build -o dockyard ./cmd/dockyard- Run the server:
./dockyardDockyard can be configured using a config.yml file or environment variables.
Create a config.yml file in the project root:
server:
port: 8082
host: 0.0.0.0
allowedOrigins:
- "*"
database:
mode: memory # or "postgres", "mysql", etc.
cache:
mode: memory # or "redis"
# redis:
# host: localhost
# port: 6379Configuration can also be provided via environment variables with the prefix matching the YAML structure.
./dockyardThe server will start on port 8082 by default.
curl http://localhost:8082/admin/api/v1/healthcurl http://localhost:8082/v2/Configure your Docker client to use Dockyard as a registry:
# Push an image
docker tag myimage:latest localhost:8082/tenant/project/myimage:latest
docker push localhost:8082/tenant/project/myimage:latest
# Pull an image
docker pull localhost:8082/tenant/project/myimage:latest.
├── cmd/
│ └── dockyard/ # Main application entry point
├── internal/
│ ├── config/ # Configuration management
│ ├── database/ # Database abstractions
│ ├── handlers/ # HTTP request handlers
│ │ ├── adminhandlers/ # Admin API handlers
│ │ └── ocihandlers/ # OCI API handlers
│ ├── middlewares/ # HTTP middlewares
│ ├── repositories/ # Data repositories
│ ├── server/ # HTTP server setup
│ └── services/ # Business logic services
├── config.yml # Configuration file
└── go.mod # Go module dependencies
go test ./...go build -o dockyard ./cmd/dockyardThis project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For issues, questions, or contributions, please use the GitHub issue tracker.