openssl req -new -x509 -days 3650 -keyout ca.key -out ca.crt Generating a RSA private key ....+++++ .........+++++ writing new private key to 'ca.key' Enter PEM pass phrase: Verifying - Enter PEM pass phrase: ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:CN State or Province Name (full name) [Some-State]:BeiJing Locality Name (eg, city) []:BeiJing Organization Name (eg, company) [Internet Widgits Pty Ltd]:harbor.acaiblog.top Organizational Unit Name (eg, section) []:Personal Common Name (e.g. server FQDN or YOUR name) []:harbor.acaiblog.top Email Address []:
./prepare docker-compose -f docker-compose.yml up -d
docker客户端添加hosts解析
192.168.2.21 harbor.acaiblog.top
docker客户端测试登录harbor
$ docker login harbor.acaiblog.top Username: admin Password: WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store