OCI Artifact - Deploy directly from GitHub Container Registry
A private Docker registry for storing and distributing container images within your infrastructure.
This is a Docker Compose OCI artifact, not a traditional Docker image. It contains a complete docker-compose.yml configuration that you can deploy directly using Docker 25.0+.
# 1. Create environment file
cat > .env.registry << 'EOF'
COMPOSE_PROJECT_NAME=registry
SERVICE_DOMAIN=registry.example.com
REGISTRY_VERSION=3.0.0
EOF
# 2. Deploy
bc registry up
# 3. Check status
bc registry psNote: Install the bc CLI with:
curl -fsSL https://raw.githubusercontent.com/beevelop/beecompose/main/scripts/install.sh | sudo bash
# 1. Create environment file
cat > .env.registry << 'EOF'
COMPOSE_PROJECT_NAME=registry
SERVICE_DOMAIN=registry.example.com
REGISTRY_VERSION=3.0.0
EOF
# 2. Deploy from GHCR
docker compose -f oci://ghcr.io/beevelop/registry:latest --env-file .env.registry up -d --pull always
# 3. Check status
docker compose -f oci://ghcr.io/beevelop/registry:latest --env-file .env.registry ps- Docker 25.0+ (required for OCI artifact support)
- Docker Compose v2.24+
- Traefik reverse proxy (see traefik)
| Container | Image | Purpose |
|---|---|---|
| registry | registry:3.0.0 | Docker Registry v2 API server |
| Variable | Description | Example |
|---|---|---|
SERVICE_DOMAIN |
Domain for the registry | registry.example.com |
| Variable | Description | Default |
|---|---|---|
COMPOSE_PROJECT_NAME |
Docker Compose project name | registry |
REGISTRY_VERSION |
Registry image version | 3.0.0 |
| Volume | Purpose |
|---|---|
registry_data |
Container image layers and manifests |
registry_auth |
htpasswd authentication file |
The registry uses htpasswd authentication. Create credentials before pushing images:
# Install htpasswd (if not available)
# apt-get install apache2-utils
# Create htpasswd file
docker exec -it registry sh -c "htpasswd -Bbn myuser Swordfish > /auth/htpasswd"
# Or add additional users
docker exec -it registry sh -c "htpasswd -Bb /auth/htpasswd anotheruser Swordfish"# Login to the registry
docker login registry.example.com -u myuser
# Tag and push an image
docker tag alpine:latest registry.example.com/alpine:latest
docker push registry.example.com/alpine:latest
# Pull the image
docker pull registry.example.com/alpine:latestbc registry logs -f # View logs
bc registry restart # Restart
bc registry down # Stop
bc registry update # Pull and recreate# Define alias for convenience
alias dc="docker compose -f oci://ghcr.io/beevelop/registry:latest --env-file .env.registry"
# View logs
dc logs -f
# Restart
dc restart
# Stop
dc down
# Update
dc pull && dc up -dRemove unreferenced blobs to reclaim disk space:
docker exec -it registry bin/registry garbage-collect /etc/docker/registry/config.ymlEnsure the htpasswd file exists and has correct permissions:
docker exec -it registry cat /auth/htpasswdVerify you're logged in and the user exists in htpasswd:
docker login registry.example.comCheck logs with dc logs registry and ensure all required environment variables are set.