Docker Windows本地注册表:接收到意外的HTTP状态:500内部服务器错误 [英] Docker Windows Local Registry: received unexpected HTTP status: 500 Internal Server Error
问题描述
我试图将Windows容器的映像推送到Windows VM上具有其自己IP地址的本地"存储库中.
因此,当我在VM上创建注册表时,可以通过转到ipaddress:5000来查看本地计算机上的存储库列表.
但是,当我尝试将图像推送到注册表时,它显示了要推送的层,但是在底部,它表示收到了意外的HTTP状态:500 Internal Server Error.
当我切换到Linux容器时,这不是问题.我可以从注册表中进行推拉操作.
您需要通过在守护程序配置JSON文件中设置" allow-nondistributable-artifacts
"选项来允许不可分发的工件./p>
对于Linux:使用上述选项在/etc/docker/daemon.json
对于Windows:
- 右键单击系统任务栏中的 Docker 图标,然后选择设置
- 选择守护程序标签
- 启用高级选项(如果已禁用)
-
将选项
allow-nondistributable-artifacts
添加到JSON Like:{注册表镜像":[],不安全的注册表":[],调试":是的,实验性":是的,允许不可分配的工件":[本地主机:5000"]}
-
用您自己的服务器名称替换
localhost
. - 或者,
daemon.json
文件位于C:\ ProgramData \ Docker \ config \ daemon.json
下
注意:如果您有其他设置,则仅 allow-nondistributable-artifacts
是重要/必需的.
I am attempting to push an image of a windows container to a "local" repository on a Windows VM, which has it's own IP address.
So when I create the registry on my VM, I can view the repository list on my local machine by going to the ipaddress:5000 just fine.
However, when I try to push an image to the registry it shows the layers to be pushed but at the bottom it says received unexpected HTTP status: 500 Internal Server Error.
This isn't a problem when I switch to Linux containers. I can push and pull from the registry no problem.
You need to allow non distributable artifacts by setting the "allow-nondistributable-artifacts
" option in the daemon configuration JSON file.
For Linux: Create or update the docker daemon JSON file with the above option at /etc/docker/daemon.json
For Windows:
- Right click on Docker icon in the system tray and select settings
- Select the Daemon tab
- Enable Advanced option (if disabled)
Add the option
allow-nondistributable-artifacts
into the JSON Like:{ "registry-mirrors": [], "insecure-registries": [], "debug": true, "experimental": true, "allow-nondistributable-artifacts": [ "localhost:5000" ] }
Replace
localhost
with the name of your own server name.- Alternatively, the
daemon.json
file is located underC:\ProgramData\Docker\config\daemon.json
Note: If you have any other settings, ONLY allow-nondistributable-artifacts
is important/required.
这篇关于Docker Windows本地注册表:接收到意外的HTTP状态:500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!