Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker registry should take the storage rootdir path from command line parameter rather than from config file #153

Open
hadmut opened this issue Nov 6, 2023 · 1 comment

Comments

@hadmut
Copy link

hadmut commented Nov 6, 2023

Hi,

as far as I can see, the docker registry can perform only one of these tasks:

  • store local/private docker images
  • act as a proxy and cache for a particular registry somewhere out there in the internet

When having several tasks, i.e. store both local images and act as a proxy for one or more foreign registries, several instances need to be run.

This, actually, wouldn't be problem and can easily be started with systemd templates or as several docker containers. Which, however, is error prone since the storage location needs to be mentioned both in the mechanism starting the registry, i.e. a systemd unit or a container with subdirectories in a shared volume, and the config file itself.

Wouldn't life be easier and less error prone, if a systemd template unit or docker entrypoint could simply for several /etc/docker/*.conf do

ExecStartPre=mkdir /var/lib/docker-registry/%i
ExecStart=/usr/bin/docker-registry serve -d /var/lib/docker-registry/%i /etc/docker/registry/%i.yml

with the -d argument to have several instances run with their own directory?

regards

@milosgajdos
Copy link
Member

Please open an issue in https://github.com/distribution/distribution

This repo is just for the official image build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants