docker-registry-sqlite

Docker Registry with Multi-User Support

A modern, private Docker registry with multi-user support, featuring a beautiful Bootstrap-based web interface with multiple themes.

Features

Quick Start

Docker Compose (SQLite Version) https://github.com/wildfirebill-docker/docker-registry-sqlite

cd docker
docker-compose -f docker-compose.sqlite.yml up -d

Docker Compose (MariaDB Version)

cd docker
docker-compose -f docker-compose.mariadb.yml up -d

Access

Docker Commands

Build SQLite Version

cd docker
docker build -f Dockerfile.sqlite -t docker-registry-sqlite ..

Build MariaDB Version

cd docker
docker build -f Dockerfile.mariadb -t docker-registry-mariadb ..

Run SQLite Version

docker run -d \
  --name docker-registry \
  -p 8080:8080 \
  -v registry-data:/data \
  -e JWT_SECRET=your-secret \
  -e ADMIN_PASSWORD=your-password \
  docker-registry-sqlite

Run MariaDB Version

docker run -d \
  --name docker-registry-mariadb \
  -p 8080:8080 \
  -e DB_SOURCE="root:password@tcp(mariadb:3306)/registry" \
  -e JWT_SECRET=your-secret \
  -e ADMIN_PASSWORD=your-password \
  --link mariadb:mariadb \
  docker-registry-mariadb

Environment Variables

Variable Description Default
PORT Server port 8080
DB_DRIVER Database driver (sqlite/mysql/mariadb) sqlite
DB_SOURCE Full DSN connection string (overrides individual DB_* vars) /data/registry.db
DB_HOST External database host (leave empty for SQLite) localhost
DB_PORT External database port 3306
DB_USER External database username root
DB_PASSWORD External database password password
DB_NAME External database name registry
JWT_SECRET Secret key for JWT tokens auto-generated
ADMIN_USERNAME Initial admin username admin
ADMIN_PASSWORD Initial admin password admin123
ADMIN_EMAIL Admin email admin@localhost
HTTPS_ENABLED Enable HTTPS cookies false

SQLite Usage

docker run -d \
  -p 8080:8080 \
  -v registry-data:/data \
  -e DB_DRIVER=sqlite \
  -e DB_SOURCE=/data/registry.db \
  docker-registry-sqlite

External MySQL/MariaDB Usage

docker run -d \
  -p 8080:8080 \
  -e DB_DRIVER=mysql \
  -e DB_HOST=mariadb.example.com \
  -e DB_PORT=3306 \
  -e DB_USER=registry \
  -e DB_PASSWORD=secure_password \
  -e DB_NAME=registry \
  docker-registry-sqlite

Or use full DSN:

docker run -d \
  -p 8080:8080 \
  -e DB_DRIVER=mysql \
  -e DB_SOURCE="user:password@tcp(host:3306)/dbname" \
  docker-registry-sqlite

Unraid Installation

  1. Go to your Unraid web UI
  2. Navigate to Docker > Add Container
  3. Select “Template” and choose the XML template
  4. Configure the required variables
  5. Click Apply

Unraid XML Templates

Building VM Images

Requirements

Build VM Images

cd vm-builder
./build-vm.sh

This creates:

Build Standalone ISO

cd os-builder
./build-iso.sh

API Endpoints

Authentication

Repositories

Tags

Admin

Registry API v2

Docker Push/Pull

Login to Registry

docker login localhost:8080

Tag and Push Image

docker tag myimage:latest localhost:8080/myimage:latest
docker push localhost:8080/myimage:latest

Pull Image

docker pull localhost:8080/myimage:latest

Security Considerations

  1. Change Default Password: Always change the default admin password
  2. JWT Secret: Use a strong, unique JWT secret in production
  3. HTTPS: Enable HTTPS in production environments
  4. Database: Use MariaDB for production with multiple users
  5. Network: Run behind a reverse proxy with SSL/TLS

Security & Vulnerability Status

CVE Reduction Achieved

Metric Before After
Total CVEs 17 2
Critical 1 0
High 2 0
Medium 14 2

Vulnerability Mitigations

Dockerfile Security Features

Technology Stack

License

MIT License