Generate a certificate of your own signature
The process of generating the signature needs to be prompted to enter some parameters, you need to note that when common name needs to enter a domain name that you need, if the internal domain name remember when you need to modify the hosts.
Mkdir/data/certs-p
Cd/data/certs
OpenSSL Req-newkey rsa:4096-nodes-sha256 \
-keyout domain.key-x509-days 365-out DOMAIN.CRT
Running Docker registry Images
Docker run-d-P 443:5000--restart=always--name registry \
>-v/data/certs:/certs \
>-v/data:/var/lib/registry \
>-e registry_http_tls_certificate=/certs/domain.crt \
>-e registry_http_tls_key=/certs/domain.key \
> Registry:2
Client Configuration
Copy the above generated certificate file domain.crt to the /etc/docker/certs.d/domain name/ directory on the client segment machine and rename to Ca.crt
Ubuntu modifies the /etc/default/docker file to add content to the docker_opts :--insecure-registry registry.dev
Restarting the Docker service
Verifying successful Docker Registry validation
The browser accesses the https://domain name/v2/, the display {} succeeds, and if the browser prompts for a certificate security issue, please ignore
Remote push image to registry
Docker tage ubuntu:14.04 domain name/ubuntu:14.04
Docker push Domain/ubuntu:14.04
Browser access https://domain name/v2/_catatlog, will appear {"Repositories": ["Ubuntu"]},
Continue to access Https://registry.dev/v2/ubuntu/tags/list, will display {"Name": "Ubuntu", "tags": ["14.04"]}
Pull Mirror
Docker Pull Domain/ubuntu:14.04
Ubuntu Docker Deployment Docker Registry V2