CV0-004 practice question 3 of 30

Which of the following describes the main difference between public and private container repositories?

Full set: 254 questions
Answer options
A: Private container repository access requires authorization, while public repository access does not require authorization. Correct answer
B: Private container repositories are hidden by default and containers must be directly referenced, while public container repositories allow browsing of container images.
C: Private container repositories must use proprietary licenses, while public container repositories must have open-source licenses.
D: Private container repositories are used to obfuscate the content of the Dockerfile, while public container repositories allow for Dockerfile inspection.
Correct Answer:
A. Private container repository access requires authorization, while public repository access does not require authorization.
Explanation

The fundamental difference between public and private container repositories is access control. Public repositories, such as those on Docker Hub, are accessible to anyone on the internet for pulling images without requiring authentication. Private repositories are restricted; a user must first authenticate (prove their identity) and then be authorized (have the correct permissions) to access the images within it. This mechanism is essential for organizations to securely store and manage proprietary or sensitive application images, ensuring they are not exposed to the public.

Why Incorrect

B. Browsing capabilities are a user interface feature of the repository service, not the core distinction, which is rooted in access control.
C. The choice of software license (open-source vs. proprietary) is independent of the repository's visibility setting; both license types can exist in either repository type.
D. A Dockerfile is used to build an image and is not typically stored within the image itself; its inspection is related to source code access, not the repository type.

References

1. Docker Documentation, "Repositories": "A repository can be public or private. Anyone can view and pull images from a public repository. You need permissions to pull images from a private repository. Private repositories are a great way to manage images you don't want to share publicly, such as images that contain proprietary source code or application data." (Reference: Docker Inc., Docker Docs, "Repositories", Section: "Public and private repositories").

2. Amazon Web Services (AWS) Documentation, "Amazon ECR User Guide": In its description of private repositories, the guide states,"...access can be controlled using both repository policies and IAM policies." For public repositories, it notes, "Anyone can browse and pull images from a public repository." This directly contrasts the access models, highlighting authorization for private and open access for public. (Reference: AWS, Amazon ECR User Guide, "Amazon ECR private repositories" and "Amazon ECR public repositories" sections).

3. Google Cloud Documentation, "Artifact Registry overview": "You can control access to your repositories by granting permissions to principals... Artifact Registry uses Identity and Access Management (IAM) to manage permissions." It further explains how to make a repository public by granting the reader role to allUsers, reinforcing that the default state is private and access is managed via authorization. (Reference: Google Cloud, Artifact Registry Documentation, "Configuring access control").

Scroll to Top