Back to articles
DevOps & Systems

Skipping Docker Hub with Zot Registry for Storing OCI Images and Helm Charts

This guide enables organizations to self-host OCI images and Helm charts using Zot Registry, eliminating dependency on Docker Hub, reducing latency, enhancing security, and...

DPTCloud Engineering4 min read
Skipping Docker Hub with Zot Registry for Storing OCI Images and Helm Charts

This guide enables organizations to self-host OCI images and Helm charts using Zot Registry, eliminating dependency on Docker Hub, reducing latency, enhancing security, and achieving full control over internal registry infrastructure. It covers setting up Zot Registry on VPS or Dedicated Server, configuring Docker to access the internal registry, synchronizing images and charts, optimizing performance, and securing the system.

Why Skip Docker Hub?

Docker Hub is widely used but has limitations such as download rate limits for free users, slower pull speeds, and security risks from third-party dependencies. For organizations requiring high performance, security, and control, self-hosting a registry like Zot Registry is optimal. Zot Registry supports OCI images and Helm charts, offering fast image distribution, access control, and integration with DevOps tools like Docker, Kubernetes, and Helm.

Setting Up Zot Registry on VPS or Dedicated Server

Begin with a reliable server such as a Cloud VPS NVMe or a High-Performance Dedicated Server. Follow these steps to deploy Zot Registry:

1. Install Docker if not already installed:

sudo apt update
sudo apt install docker.io -y
sudo systemctl enable docker
sudo systemctl start docker

2. Launch Zot Registry:

docker run -d \
  --name zot-registry \
  -p 5000:5000 \
  -v /path/to/data:/var/lib/zot \
  -v /path/to/config:/config \
  zotregistry/zot:latest

3. Configure Zot Registry (config.json):

{
  "storage": {
    "path": "/var/lib/zot"
  },
  "http": {
    "address": "0.0.0.0",
    "port": "5000"
  },
  "log": {
    "level": "info"
  }
}

4. Restart Zot Registry:

docker restart zot-registry

Synchronizing Images and Helm Charts

To sync images and charts from Docker Hub or other sources into Zot Registry, use tools like zot-sync or zot-chart-sync. For example:

zot-sync --source docker-hub --target zot-registry:5000 --image nginx:latest

For Helm charts:

zot-chart-sync --source https://charts.helm.sh/stable --target zot-registry:5000 --chart nginx

Optimizing Performance and Security

To enhance performance, configure Zot Registry with:

  • Internal CDN for image distribution
  • Nginx as a reverse proxy
  • OAuth or JWT-based access control

For security, implement:

  • TLS encryption for registry access
  • Role-Based Access Control (RBAC)
  • Logging and monitoring of registry activity

Backup and Recovery

To ensure availability, schedule regular backups of registry data. For example:

docker run --rm -v /path/to/data:/var/lib/zot -v /path/to/backup:/backup busybox tar -czf /backup/zot-backup.tar.gz /var/lib/zot

Maintaining Consistency

To ensure consistency, apply:

  • Image tagging and pruning policies
  • Synchronized versions of registry and related tools
  • Regular performance and security audits

References

For more information, refer to the official Zot Registry documentation at Zot Registry Documentation.

Related infrastructure & engineering guides: NVMe Cloud VPS for Docker, Nginx & Databases · Building a Privacy-First Static Site Analytics System from a VPS Host with Umami and ClickHouse

DPTCloud Tier III Infrastructure

Recommended NVMe Cloud VPS Plans to Deploy This Setup

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02

VPS-2E

94.600 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 2 GB
  • SSD: 30 GB NVMe
ECO · vn-02Recommended

VPS-3E

170.500 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 4 GB
  • SSD: 50 GB NVMe
BASIC · vn-01Recommended

VPS-05

457.600 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478