无法推送到神器docker云存储库

时间:2015-07-23 09:56:39

标签: docker cloud artifactory

我有一个神器云帐户,它应该支持docker存储库,我已经设置了一个nginx代理,一切看起来还不错,但是当推送docker报告405错误时,我遇到了问题,我是什么可见,它并不支持PUT方法。

以下是命令和响应:

docker push 10.0.2.2:8443/proxy
The push refers to a repository [10.0.2.2:8443/proxy] (len: 1)
7cad47f9dd1b: Image push failed 
Error pushing to registry: Server error: 405 trying to push proxy blob - sha256:a40574043c2db30c7d0fbac107dda7d592efd479c3c1204c481e76cea2ed1ecc

这是相关的nginx配置

server {
       listen       8443 ssl;
       server_name  localhost;

       ssl on;
       ssl_certificate /Users/iamedu/Development/gextech/cherry/ops/docker/proxy/cert/server.crt;
       ssl_certificate_key /Users/iamedu/Development/gextech/cherry/ops/docker/proxy/cert/server.key;

       access_log logs/access.log;
       error_log logs/error.log;

       proxy_set_header Host gextech.artifactoryonline.com;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Original-URI $request_uri;
       proxy_set_header      Authorization "Basic AHARCODEDTOKEN";

       proxy_read_timeout 900;


       client_max_body_size 0;

       chunked_transfer_encoding on;

       location /v2 {
         dav_methods PUT DELETE;
         if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
           return 404;
         }
         proxy_pass http://anaccount.artifactoryonline.com/anaccount/api/docker/local-docker/v2;
       }

}

0 个答案:

没有答案