Search code examples
artifactory

Change docker repository class (local to virtual)


We need more flexibility in our current local docker repos (ie. we want to be able to pull local and remote images from the same repo). Therefore, I'd like to rename our docker repo to docker-local whilst creating a new virtual docker repo called docker which includes docker-local. Is there a way to do this operation atomically?

I've read that renaming repositories is considered bad in artifactory. Would renaming the repo in this case break anything? It's not really clear to me what are the problems with renaming a repo. Would the internal state be inconsistent?


Solution

  • It is indeed possible and as you already mentioned considered bad practice as it could indeed mess up the internal state of Artifactory if done incorrectly.

    The better alternative would be to create a new repo called docker-local and move the artifacts from the current repo there (move is a much cheaper option when it comes to resources). After that you can delete the docker repo and create it as a virtual one.

    Please be aware that as you're doing this, the clients connecting to the repository won't be able to resolve their dependencies.