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:
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.
daemon.json file is located under C:\ProgramData\Docker\config\daemon.jsonNote: If you have any other settings, ONLY allow-nondistributable-artifacts is important/required.
To me the problem was that our registry was full. I emptied it and it worked.
It could be because of an error on the remote server(or local server) where you want to push your image. In my case it was a disk space issue which was thrown as a 500 Server Error. The issue needs to be checked on the server where the image is being pushed.
All of your images were pushed except a few ones because all the others were already pushed and the ones which were new failed.