0
0
Dockerdevops~5 mins

Docker Hub public and private repos - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a public repository on Docker Hub?
A public repository on Docker Hub is a storage space for Docker images that anyone can access and download without needing special permissions.
Click to reveal answer
beginner
What is a private repository on Docker Hub?
A private repository on Docker Hub is a storage space for Docker images that only authorized users can access, keeping the images hidden from the public.
Click to reveal answer
intermediate
How do you push an image to a private Docker Hub repository?
First, log in with 'docker login'. Then tag your image with your Docker Hub username and repo name. Finally, use 'docker push username/repo:tag' to upload it.
Click to reveal answer
beginner
Why would you choose a private repository over a public one?
You choose a private repository to keep your Docker images secure and restrict access to trusted users only, protecting sensitive or proprietary software.
Click to reveal answer
beginner
What command do you use to log in to Docker Hub from the command line?
Use the command 'docker login' and enter your Docker Hub username and password when prompted.
Click to reveal answer
Which Docker Hub repository type allows anyone to pull images without logging in?
APublic repository
BPrivate repository
CLocal repository
DEncrypted repository
What is the first step before pushing an image to a private Docker Hub repo?
ARun 'docker logout'
BRun 'docker build'
CRun 'docker pull'
DRun 'docker login'
How do you make a Docker Hub repository private?
AUse a special Docker CLI command
BSet repository visibility to private in Docker Hub settings
CPush images with a secret tag
DEncrypt the image before pushing
Which command tags a local image for pushing to Docker Hub?
Adocker build username/repo
Bdocker push local-image
Cdocker tag local-image username/repo:tag
Ddocker pull username/repo
What is a key benefit of using private Docker Hub repositories?
AControl who can access your images
BUnlimited free storage
CFaster image downloads
DAutomatic image building
Explain the difference between public and private Docker Hub repositories and when you might use each.
Think about who can see and download the images.
You got /4 concepts.
    Describe the steps to push a Docker image to a private repository on Docker Hub.
    Start with authentication, then prepare the image name, then upload.
    You got /3 concepts.