问题:
docker push 10.107.103.236:5000/busybox
The push refers to a repository [10.107.103.236:5000/busybox]
0314be9edf00: Pushing [==================================================>] 1.146MB/1.146MB
error parsing HTTP 400 response body: invalid character '<' looking for beginning of value: "\n\n
\n
\xb4\xed\xce\xf3\xa3\xba\xc4\xfa\xcb\xf9\xc7\xeb\xc7\xf3\xb5\xc4\xcd\xf8?\xa3\xa8URL\xa3\xa9\xce\u07b7\xa8\xbb\xf1?\n\n\n
\xb4\xed\xce\xf3
\n
\xc4\xfa\xcb\xf9\xc7\xeb\xc7\xf3\xb5\xc4\xcd\xf8?\xa3\xa8URL\xa3\xa9\xce\u07b7\xa8\xbb\xf1?
\n
\n
\n\xb5\xb1\xb3\xa2\xca?\xf8\xd0\xd0\xd2\xd4\xcf\xc2\xc7\xeb\xc7\xf3?\xa3\xba\n
\nPATCH %3D HTTP/1.1\r\nHost: 10.107.103.236:5000\r\nUser-Agent: docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/3.10.0-514.26.2.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/17.05.0-ce \\(linux\\))\r\nTransfer-Encoding: chunked\r\nAccept-Encoding: gzip\r\nConnection: close\r\n\r\n1\r\n\x1f\r\n\n
\n
\n\xb7\xa2\xc9\xfa\xc1\xcb\xcf\xc2\xc1е?\xed\xce\xf3\xa3\xba\n
\n- \n\nInvalid Request\n
\n\xce\xdeЧ\xb5\xc4\xc7\xeb\xc7\xf3\n\n
\n\n
\nSome aspect of the HTTP Request is invalid. Possible problems:\n
\nHTTP \xc7\xeb\xc7\xf3\xb5\xc4?Щ\xb7\xbd\xc3\xe6\xca\xc7\xce\xdeЧ\xb5?\xa3\xbf\xc9\xc4\xdc\xca\xc7\xcf\xc2\xc1\xd0\xce\xca\xcc?\n
\n- Missing or unknown request method\n
?\xc9\xd9\xc7\xeb\xc7\xf3\xb7\xbd?\xbb\xf2δ?\xb5\xc4\xc7\xeb\xc7\xf3\xb7\xbd?\n - Missing URL\n
?\xc9\xd9\xcd\xf8?\n - Missing HTTP Identifier (HTTP/1.0)\n
?\xc9\xd9 HTTP \xb1\xea?\xa3\xa8HTTP/1.0\xa3\xa9\n - Request is too large\n
\xc7\xeb\xc7\xf3\xc3\xfc\xc1\xee\xb9\xfd\xb3\xa4\n - Content-Length missing for POST or PUT requests\n
POST \xbb\xf2 PUT \xc7\xeb\xc7\xf3?\xc9\xd9\xc4\xda\xc8?\xa4\xb6\xc8\n - Illegal character in hostname; underscores are not allowed\n
\xd6\xf7\xbb\xfa\xc3\xfb\xb3\xc6\xd6а\xfc\xba\xac\xb2\xbb\xba?\xa8\xb5\xc4\xd7?\xfb\xa3\xbb\xcf?\xae\xcf\xdf\xca?\xbb\xd4\xca\xd0\xed\xb5?\xa3\n
\n\n
\xb1\xbe\xbb\xba\xb4\xe6\xb7\xfe\xce\xf1\xc6\xf7\xb9\xdc\xc0\xed?\xa3\xbasty_squid_50. \n
\n"
解决方法:
编辑
/etc/systemd/system/docker.service.d/http-proxy.conf
增加
Environment="NO_PROXY=localhost,127.0.0.0/8,docker-registry.somecorporation.com"
重启daemon
sudo systemctl daemon-reload
查看参数是否生效
sudo systemctl show docker --property Environment
重启服务
sudo systemctl restart docker
重新push发现不再报错了
阅读(13704) | 评论(1) | 转发(0) |