我在DigitalOcean服务器上启动了一个私有docker注册表,其IP地址解析为 docker.example.com (A记录)。操作系统是RancherOS。
docker run -d -p 443:5000 --name registry --restart=always \
-v $(pwd)/var/lib/registry:/var/lib/registry \
-v $(pwd)/auth:/auth \
-e REGISTRY_HTTP_ADDR=0.0.0.0:5000 \
-e REGISTRY_HTTP_HOST=https://docker.example.com \
-e REGISTRY_HTTP_TLS_LETSENCRYPT_CACHEFILE=/etc/docker/registry/letsencrypt.json \
-e REGISTRY_HTTP_TLS_LETSENCRYPT_EMAIL=admin@example.com \
-e REGISTRY_AUTH_HTPASSWD_REALM=distortum \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
registry:2
Acme未能设置SSL证书。这是在日志中:
2018/03/10 22:29:15 [INFO] acme: Registering account for admin@example.com
time="2018-03-10T22:29:16Z" level=info msg="listening on [::]:5000, tls" go.version=go1.7.6 instance.id=46277ada-99d7-458e-aa24-7ef9b9009f86 version=v2.6.2
2018/03/10 22:29:44 [INFO][docker.example.com] acme: Obtaining bundled SAN certificate
2018/03/10 22:29:45 [INFO][docker.example.com] acme: Could not find solver for: dns-01
2018/03/10 22:29:45 [INFO][docker.example.com] acme: Could not find solver for: http-01
2018/03/10 22:29:45 http: TLS handshake error from 120.17.222.195:41255: map[docker.example.com:[docker.example.com] acme: Could not determine solvers]
知道如何让这个工作吗?