简体   繁体   中英

Unable to upload into a virtual repository without default local deployment configured

I have few local repositories configured and one remote (DockerHub). I created a virtual repository ( docker ) and then added all the local repositories and the remote repository to it. In Default Deployment Repository dropdown of the virtual repository, I have not selected any of the local repositories because a user may push to any of the local repos. Now when I try pushing to the container registry, I see this error:

$ docker push company-registry.com/docker/<local-repository-1>:<tag>
...
a45c89213058: Retrying in 1 second 
272e3b690172: Waiting
...
Unable to upload into a virtual repository without default local deployment configured

I'm not sure why it's complaining for selecting a local repository in Default Deployment Repository section. If two users want to push images to different local repositories, how are they going to push then? On this page, it says "You can optionally also configure your Default Deployment Repository ..." which confirms it's an optional feature. Also, I don't have any image promotion scenario where I would need this.

This also makes me think whether I need to create as many virtual repositories as there are local repositories. For example,

virtual-microsvc-1: local-microsvc-1 + docker-hub-remote 
virtual-microsvc-2: local-microsvc-2 + docker-hub-remote
virtual-microsvc-3: local-microsvc-3 + docker-hub-remote 
...
...

with each virtual repository's Default Deployment Repository pointing to its local repo.

The "Default Deployment Repository" is optional when you are not planning to push images to the Virtual repository.

If you are planning to push Docker images to a Virtual repository, a "Default Deployment Repository" must be configured in order to designate one Local repository as the deployment target. Alternatively, images can be pushed to the Local repositories directly, bypassing the Virtual repository.

A Virtual repository is a collection of repositories that can serve as a single endpoint for the users. The repositories that are aggregated under the Virtual repository can be changed at any time without additional client-side changes. So you can have one Virtual repository with several Local repositories, but if you want to deploy images to more than one Local repository, you should bypass the Virtual repository and deploy directly to the Local repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM