Skip to content

Conversation

@venkatamutyala
Copy link
Contributor

@venkatamutyala venkatamutyala commented Aug 25, 2025

PR Type

Other


Description

  • Remove volume mappings from all registry services

  • Eliminate persistent data storage for registry proxies

  • Transition to ephemeral registry configuration


Diagram Walkthrough

flowchart LR
  A["Registry Services"] --> B["Remove Volume Mappings"]
  B --> C["Ephemeral Storage"]
  C --> D["Cloud-init Provisioning"]
Loading

File Walkthrough

Relevant files
Configuration changes
docker-compose.yml
Remove volume mappings from registry services                       

docker-compose.yml

  • Removed ./data:/var/lib/registry volume mappings from all 9 registry
    services
  • Eliminated persistent storage configuration for registry proxies
  • Services now use ephemeral storage instead of mounted volumes
+0/-18   

Removed volume mappings for all registry services. We don't need it anymore given how we provision we just do it via cloud-init and it all comes online. The node is intended to just get nuked and not be a long lived store
Copilot AI review requested due to automatic review settings August 25, 2025 03:14
@pull-request-checklist-buddy
Copy link

PR Checklist (required):

  • Is the README.md up to date?
  • Code tested appropriately (end-to-end considered)?
  • Did you review any AI provided feedback?

@codiumai-pr-agent-free
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Data Persistence

Removing volume mappings means all registry cache data will be lost when containers restart. This could impact performance as images will need to be re-downloaded from remote sources each time.

version: '3'
services:
  registry-docker:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5000:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://registry-1.docker.io
    restart: always
  registry-quay:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5001:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://quay.io
    restart: always
  registry-ghcr:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5002:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://ghcr.io
    restart: always
  registry-gcr:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5003:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://gcr.io
    restart: always
  registry-aws:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5004:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://public.ecr.aws
    restart: always
  registry-mcr:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5005:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://mcr.microsoft.com
    restart: always
  registry-gitlab:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5006:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://registry.gitlab.com
    restart: always
  registry-k8s:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5007:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://registry.k8s.io
    restart: always
  public-mirror-gpkg-io:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5008:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://public-mirror.gpkg.io
Shared Path

Previously all services were using the same host path './data' for volume mapping. This could have caused conflicts between services. Verify if this was intentional or if separate data directories were needed.

version: '3'
services:
  registry-docker:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5000:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://registry-1.docker.io
    restart: always
  registry-quay:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5001:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://quay.io
    restart: always
  registry-ghcr:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5002:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://ghcr.io
    restart: always
  registry-gcr:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5003:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://gcr.io
    restart: always
  registry-aws:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5004:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://public.ecr.aws
    restart: always
  registry-mcr:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5005:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://mcr.microsoft.com
    restart: always
  registry-gitlab:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5006:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://registry.gitlab.com
    restart: always
  registry-k8s:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5007:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://registry.k8s.io
    restart: always
  public-mirror-gpkg-io:
    image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
    ports:
      - "5008:5000"
    environment:
      REGISTRY_PROXY_REMOTEURL: https://public-mirror.gpkg.io

@codiumai-pr-agent-free
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Add memory limits

Consider adding memory limits to the registry services to prevent potential
out-of-memory issues. Since you've removed persistent storage, the in-memory
cache could grow unbounded and potentially crash the host system under heavy
load.

docker-compose.yml [3-9]

 registry-docker:
   image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
   ports:
     - "5000:5000"
   environment:
     REGISTRY_PROXY_REMOTEURL: https://registry-1.docker.io
   restart: always
+  deploy:
+    resources:
+      limits:
+        memory: 2G

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies that removing persistent storage can lead to unbounded memory usage by the in-memory cache, and proposes a valid solution to prevent potential out-of-memory errors.

Medium
General
Configure cache parameters

Configure cache parameters for the registry services since you've removed
persistent storage. Without proper cache configuration, the registry may not
efficiently manage memory usage or provide optimal performance.

docker-compose.yml [3-9]

 registry-docker:
   image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
   ports:
     - "5000:5000"
   environment:
     REGISTRY_PROXY_REMOTEURL: https://registry-1.docker.io
+    REGISTRY_PROXY_CACHE_TTL: "24h"
+    REGISTRY_STORAGE_CACHE_BLOBDESCRIPTOR: "inmemory"
   restart: always

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out the need to configure cache behavior now that it's in-memory, improving performance and resource management by making cache settings explicit.

Medium
  • More

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes volume mappings from all registry services in the Docker Compose configuration. This change affects data persistence for registry proxy services by removing the shared ./data:/var/lib/registry volume mount from all registry services.

  • Removed volume mappings from all registry services (registry-docker, registry-quay, registry-ghcr, etc.)
  • Eliminated persistent storage configuration for registry data
  • Simplified service definitions by removing volume configuration sections

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 3 to 9
registry-docker:
image: registry:3@sha256:3725021071ec9383eb3d87ddbdff9ed602439b3f7c958c9c2fb941049ea6531d
volumes:
- ./data:/var/lib/registry
ports:
- "5000:5000"
environment:
REGISTRY_PROXY_REMOTEURL: https://registry-1.docker.io
restart: always
Copy link

Copilot AI Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing volume mappings means registry data will not persist across container restarts. This could lead to repeated downloads of the same images and loss of cached registry data, potentially impacting performance and bandwidth usage. Consider whether ephemeral storage is intentional for these proxy registries.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant