问题现象
[root@k8s-master01 sentiment-recognition-v2]# docker push dockerhub.ai.local/ai-middle/base-image-algorithm-sentiment-recognition-v2-centos7.6-python3.6.15:v1.0.0
The push refers to repository [dockerhub.ai.local/ai-middle/base-image-algorithm-sentiment-recognition-v2-centos7.6-python3.6.15]
420a4fa26845: Pushing [==================================================>] 2.622GB/2.622GB
bc1b701fc849: Pushed
4e55f7d6f011: Pushed
89169d87dbe2: Mounted from ai-middle/base-image-algorithm-cluster-centos7.6-python3.6.1
error parsing HTTP 413 response body: invalid character '<' looking for beginning of value: "<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body>\r\n<center><h1>413 Request Entity Too Large</h1></center>\r\n<hr><center>nginx/1.22.0</center>\r\n</body>\r\n</html>\r\n"
[root@k8s-master01 sentiment-recognition-v2]# docker exec -it base-image-algorithm-sentiment-recognition-v2-centos7.6-python3.6.15-container-v1.0.0 /bin/bash
具体错误日志
error parsing HTTP 413 response body: invalid character '<' looking for beginning of value: "<html>\r\n<head><title>413 Request Entity Too Large</title></head>\r\n<body>\r\n<center><h1>413 Request Entity Too Large</h1></center>\r\n<hr><center>nginx/1.22.0</center>\r\n</body>\r\n</html>\r\n"
解决方案
413 请求体太大
解决 413 Request Entity Too Large(请求实体太大)-CSDN博客
docker push 报错:413 Request Entity Too Large_docker push 413 request entity too large-CSDN博客
修改nginx配置文件:nginx.conf
client_max_body_size默认为0, 修改0为特定的大小即可。如 client_max_body_size 10240M