Docker Community Forums

Share and learn in the Docker community.

Multiple private registries sharing the same filesystem location

I have 2 registries in the same host. one listens on port 5000 (insecure), and the other on 443 (tls), both have the same -v xxx:/var/lib/registry.
Is this ok to use? could it be corrupted when pushing the same image?
How to manage this usecase

thats a nice question
have you tried to push same image to different registries? how it went?
i have not tested this, its for showing purposes, you could try something like:

for x in `docker images -q`;do \ 
docker tag $x insec-registry:5000/$x && \
docker push  insec-registry:5000/$x && \
docker tag $x SAFE-registry:443/$x && \
docker push  SAFE-registry:443/$x; done

this would tag and push all your local images to the registries, then you are plenty of data to analyze

cheers

Thanks,
The suggested test is a serial one, So probably, no conflicts here.
A parallel test (with the same images) should be run though.
But I need to know the logic inside… lock mechanism, etc
Asher