2016-07-05 7 views
0

私はリモートのDockerレジストリ設定を持っています。それはGo Daddy SSL証明書がインストールされています。Dockerプライベートレジストリ - 'insecure-registry'にプッシュすると「unknown authority」という文句が残る

私はそれをカールした場合、私は '不明権威' というエラーが出ます:

curl https://example.com:5000/v2/ 

curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none 
More details here: http://curl.haxx.se/docs/sslcerts.html 

... 

If this HTTPS server uses a certificate signed by a CA represented in 
the bundle, the certificate verification probably failed due to a 
problem with the certificate (it might be expired, or the name might 
not match the domain name in the URL). 
If you'd like to turn off curl's verification of the certificate, use 
the -k (or --insecure) option. 

だから私はその後、 '安全でない' カール使用:

curl -k https://example.com:5000/v2 

を、私は

{} //which I guess is because there is nothing in the registry? 
を取得

をチェックすると、存在しないエンドポイントが巻き起こっています:

だから私は、その後、「安全でない追加することによって、エラーを抑制しようとする

docker push example.com:5000/my-image 

The push refers to a repository [example.com:5000/my-image] 
unable to ping registry endpoint https://example.com:5000/v0/ 
v2 ping attempt failed with error: Get https://example.com:5000/v2/: x509: certificate signed by unknown authority 
v1 ping attempt failed with error: Get https://example.com:5000/v1/_ping: x509: certificate signed by unknown authority 

curl -k https://example.com:5000/moo 

404 page not found //which is positive, as it means the -k flag is suppressing the 'unknown authority' correctly 

だから、今私は私が画像をプッシュするドッカークライアントを使用してみてくださいカールでレジストリに接続することが可能であることを知っていますDOCKER_OPTSに-registry」(hereに説明したように):

DOCKER_OPTS = " - 安全でない、レジストリexample.com:5000"

[再開ドッカーデーモン]

それは動作しません。私は同じ「不明な権威」の警告を受ける。

まず、Go Daddyの証明書が信頼されないのはなぜですか?私はそれをnginxサーバー上にセットアップし、それはブラウザ上の '緑色のバー'とうまくいっています。

第2に、「安全でないレジストリ」をDockerで使用するにはどうすればよいですか?ありがとう、

+0

ドッカーのレジストリを設定するには[こちら](http://stackoverflow.com/questions/39121710/not-able-to-login-in-docker-private-repositry/39245158#39245158)を参照してください。プライベート証明書。 –

答えて

0

私はこれの底になった。

私はこれでは、/ etc/default /ドッキングウィンドウを変更する必要はありませんでしたが判明:

DOCKER_OPTS="--insecure-registry example.com:5000" 

問題は、私はあまりにも中間証明書を持っているために必要なレジストリにインストールゴーダディ証明書ということでした。私はゴーダディから次を受け取っ:

domain.crt 
some-bundle.crt 

証明書チェーンが完了したように、あなたは

cat bundle.crt >> domain.crt 

する必要があります。その後、すべて正常に動作します

関連する問題