Set up server TLS authentication
===================
1. In general, the certificate only supports domain name access, to enable it to support IP address access, you need to modify the configuration file OPENSSL.CNF. Under the Ubuntu system:
sudo vim/etc/ssl/openssl.cnf added under [V3_ca]: SubjectAltName = ip:192.168.9.26
2. Generate a self-signed certificate:
1. Sudo mkdir-p/data/docker/tls_certs
2. Cd/data/docker/tls_certs
3. sudo openssl req-x509-days 3650-nodes-newkey rsa:2048-keyout docker_reg.key-out docker_reg.crt-subj "/C=CN/ST=BJ /l=beijing/cn=192.168.9.26:5000 "
4. Run Docker Registry
Docker run-d--name docker-registry-no-proxy--restart=always-u root-p 5000:5000-v/data/docker/registry/:/var/lib/re Gistry-v/data/docker/tls_certs:/certs-e registry_http_tls_certificate=/certs/docker_reg.crt-e REGISTRY_HTTP_TLS_ Key=/certs/docker_reg.key Registry:2
Set up Client TLS authentication
===================
1. Sudo mkdir-p/etc/docker/certs.d/192.168.9.26:5000/
2. sudo cp docker_reg.crt/etc/docker/certs.d/192.168.9.26:5000/ca.crt
Using a private warehouse
===================
1. Download an image from Docker:
Docker Pull Hello-world
2. Label the image as a private warehouse:
Docker tag Hello-world 192.168.9.26:5000/hello-world
3. Push it to the private repository:
Docker Push 192.168.9.26:5000/hello-world
4. Download the image from the private repository:
Docker Pull 192.168.9.26:5000/hello-world
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.