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.
The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request. This error is usually returned by the server when no other error code is suitable.
"https://registry-1.docker.io"] # ... As for where registry-1.docker.io comes from, it's the DNS name for the Docker Hub registry, which is the default when you do not specify a registry in your image name. Follow this answer to receive notifications.
For information about Docker Hub, which offers a hosted registry with additional features such as teams, organizations, web hooks, automated builds, etc, see Docker Hub. A registry is a storage and content delivery system, holding named Docker images, available in different tagged versions.
The Internal Server Error 500 is a collective status code for server errors. Therefore, at first glance, it is not possible to determine where the error actually lies. The user only knows that the server has reported an unexpected error.
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.
For Linux servers, the collection of error messages should be found at /var/log/httpd/error_log. It makes sense to reload the website to reproduce the HTTP error 500 code and observe how the log file is being created. This will help you find the source of the error quite quickly.
Add insecure-registry option in docker configuration and restart docker service. And then try docker push using machine-ip:5000 Check this out. Show activity on this post. If you set up a secure registry, you need to login to docker registry with something like this: You may need to use username:pass combo with curl.
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.json
Note: If you have any other settings, ONLY allow-nondistributable-artifacts
is important/required.
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.
To me the problem was that our registry was full. I emptied it and it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With