Private Registry

Definition

A private registry is a secure repository for storing and managing container images, artifacts, or other software packages. It is typically used to control access to sensitive or proprietary software components, ensuring that only authorized users or systems can pull or push images. Private registries often integrate with authentication and authorization mechanisms to enforce security policies and are essential for organizations that require compliance with data protection regulations.

Secure Settings Example

version: '3.8'
services:
  registry:
    image: registry:2
    ports:
      - "5000:5000"
    environment:
      REGISTRY_HTTP_TLS_CERTIFICATE: /certs/domain.crt
      REGISTRY_HTTP_TLS_KEY: /certs/domain.key
    volumes:
      - ./data:/var/lib/registry
      - ./certs:/certs
    restart: always
    networks:
      - registry-net
networks:
  registry-net:
    driver: bridge

Insecure Settings Example

version: '3.8'
services:
  registry:
    image: registry:2
    ports:
      - "5000:5000"
    environment:
      REGISTRY_HTTP_SECRET: ""
    volumes:
      - ./data:/var/lib/registry
    restart: always
    networks:
      - registry-net
networks:
  registry-net:
    driver: bridge