Complete the command to start a private Docker registry container.
docker run -d -p 5000:5000 --name registry [1] registry:2
The --restart always option ensures the registry container restarts automatically if it stops.
Complete the command to tag a local image for pushing to the private registry.
docker tag myapp:latest localhost[1]5000/myapp:latest
The colon : separates the host from the port in the registry address.
Fix the error in the command to push the image to the private registry.
docker push localhost:5000[1]myapp:latest
The slash / is needed to separate the registry address from the image name when pushing.
Fill both blanks to create a secure registry with TLS certificates.
docker run -d -p 5000:5000 --name registry -v [1]:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=[2]/cert.pem -e REGISTRY_HTTP_TLS_KEY=[2]/key.pem registry:2
The local directory /home/user/certs is mounted to /certs inside the container where the registry expects TLS files.
Fill all three blanks to configure Docker daemon to trust the private registry.
{
"insecure-registries": ["[1]:[2]"],
"debug": [3]
}Docker daemon needs the registry address and port in insecure-registries to allow pushing to insecure or self-signed registries. Debug mode is set to true for detailed logs.