Docker for windows local registry push error

微笑、不失礼 提交于 2019-12-13 20:43:37

问题


Trying to push image to local docker registry ends with HTTP status: 500 Internal Server Error. In registry logs I see err.detail="filesystem: truncate /var/lib/registry/docker/registry/v2/repositories/my-ubuntu/_uploads/25ca078f-2d29-4504-907a-87fa6745c6f6/startedat: permission denied"

I'm running Docker for windows (Docker version 18.06.1-ce, build e68fc7a), experimental features enabled, OS Windows 10 version 1803.

Steps I'm doing

docker run --platform=linux -d -p 5000:5000 --restart=always --name registry registry:2
docker pull ubuntu:16.04
docker tag ubuntu:16.04 localhost:5000/my-ubuntu
docker push localhost:5000/my-ubuntu

Inspecting registry container it shows that all directories in /var/lib/registry/docker/registry/v2/repositories/my-ubuntu/_uploads have 777 permissions: drwxrwxrwx 1 root root 4096 Sep 26 11:36 25ca078f-2d29-4504-907a-87fa6745c6f6.

Registry is running, both docker ps shows it and when I do Invoke-WebRequest -uri "http://localhost:5000/v2/" -Method GET in PowerShell I receive: HTTP/1.1 200 OK Docker-Distribution-Api-Version: registry/2.0

(If I switch to linux containers pushing to registry just works, problem is when running experimental features and switched to Windows containers)

What can I do to fix it? Why does this happen?

来源:https://stackoverflow.com/questions/52517753/docker-for-windows-local-registry-push-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!