Reputation: 5597
I am Using Windows 10 and here is my daemon conifiguration:
{
"registry-mirrors": [],
"insecure-registries": [
"blah.hub:5000"
],
"debug": true,
"experimental": true,
"allow-nondistributable-artifacts": [
"blah.hub:5000"
]
}
also i use Docker Desktop and working on Windows Mode (not Linux).
blah.hub is a name defined in my etc/hosts file and mapped to my registry machine.
i created private registry by running registry image pulled by this command:
docker run -d -p 5000:5000 -v F:/docker-hub/registry:/var/lib/registry --restart=always --name blah.hub registry
by these steps i can successfully access to path http://blah.hub:5000/v2/_catalog .
but when i want to push my tagged image as blah.hub:5000/myImg
it is not working:
docker push blah.hub:5000/myImg
The push refers to repository [blah.hub:5000/myImg]
af0b15c8625b: Retrying in 6 seconds
when i explore to registry's container volume shared with registry machine there is folders created in v2/repositories/myImg/_uploads
that contains a zero-size file named staredat
.
here is the log for registry container when i push:
11.5.2.117 - - [05/Jul/2019:06:42:36 +0000] "POST /v2/myImg/blobs/uploads/ HTTP/1.1" 500 255 "" "docker/18.09.1 go/go1.10.6 git-commit/4c52b90 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.1 \\(windows\\))"
time="2019-07-05T06:42:36.4979957Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: truncate /var/lib/registry/docker/registry/v2/repositories/myImg/_uploads/5c131802-afcc-484b-841b-4eb08a07d7a5/startedat: permission denied" err.message="unknown error" go.version=go1.11.2 http.request.host="blah.hub:5000" http.request.id=ba0c22c5-4c3d-4426-abe9-3fb609532a9a http.request.method=POST http.request.remoteaddr="10.1.2.117:32186" http.request.uri="/v2/myImg/blobs/uploads/" http.request.useragent="docker/18.09.1 go/go1.10.6 git-commit/4c52b90 os/windows arch/amd64 UpstreamClient(Docker-Client/18.09.1 \(windows\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=34.1269ms http.response.status=500 http.response.written=255 vars.name=myImg
any opinion? i missed a configuration??
Upvotes: 0
Views: 2169
Reputation: 1267
Check if the folder "F:/docker-hub/registry"
in your host machine has write permission for the users.
Upvotes: 0