0

We use jfrog artifactory as docker registry. One can put all their images in a single repository in a registry.( with seperate folders). Or we can create one repository for each application.

What is the recommended practice ? Do we create a

  1. repository per application or ?
  2. one repository for the whole company or ?
  3. something in middle and maybe several separate repositories ?

Creating separate repository per application may be a lot of work for admins ? Is there an easier way to do it ? Maybe create a CI/CD job to create and delete the repository using API ?

datta
  • 521
  • 2
  • 5
  • 16

1 Answers1

2

I would recommend referring to this wiki first to understand the docker repository. Moreover, the recommendation would be based on your use case and how you would like to manage the things, though what I would recommend is instead of creating a repository each time for a specific image which is indeed a tedious task and might also cause repository name conflict later. It is better to have a single docker local repository and push the image with a folder in it. Let us take an example of pushing the ubuntu image with 1.0 as a tag to the Artifactory, therefore it will look as Artifactory --> docker-local --> ubuntu (folder name for that image) --> ubuntu:1.0

Similarly, you can have the images pushed in this manner so that the headache of managing multiple repositories will be less, and pushing images to a single repository will help manage the images as a whole.

I would also recommend referring to the docker access methods used by the Artifactory.

Muhammed Kashif
  • 1,421
  • 3
  • 6
  • Thanks for your quick response. Is my concern for a single repository valid ? What if two teams end up creating the same folder structure ? There is nothing stopping from one team from proliferating their images with another team's folder structure. – datta Sep 01 '21 at 03:45
  • There is a chance for that definitely but you can name the repositories on each team. Suppose I have 3 teams therefore I will create 3 docker local repositories as team1-docker-local, team2-docker-local, and team3-docker-local and let each team use their specific repository – Muhammed Kashif Sep 01 '21 at 06:56