When I run steps as in https://docs.docker.com/registry/#basic-commands I end up with HTTP status: 500 Internal Server Error
during pushing image to local v2 registry . 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"
, but when exec
ing /bin/bash into registry I can truncate this file from the inside of container.
My steps:
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
Docker info:
Server Version: 18.06.1-ce
Operating System: Windows 10 Pro Version 1803 (OS Build 17134.286)
OSType: windows
Architecture: x86_64
Experimental: true
Insecure Registries:
localhost:5000
127.0.0.0/8
Attaching part of registry log, where I also see some errors about “blob unknown”. Do you know how to resolve this issue?
If I switch to linux containers everything just works, and push is successful, when doing the same steps.
(adding log below, as I can’t upload)
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code="blob unknown" err.detail=sha256:3b37166ec61459e76e33282dda08f2a9cd698ca7e3d6bc44e6a6e7580cdeff8e err.message="blob unknown to registry" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=0ed0322d-1e4f-4ab1-97f5-d52cbb0cdea2 http.request.method=HEAD http.request.remoteaddr="192.168.56.1:51543" http.request.uri="/v2/my-ubuntu/blobs/sha256:3b37166ec61459e76e33282dda08f2a9cd698ca7e3d6bc44e6a6e7580cdeff8e" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=10.9511ms http.response.status=404 http.response.written=157 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.digest="sha256:3b37166ec61459e76e33282dda08f2a9cd698ca7e3d6bc44e6a6e7580cdeff8e" vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "HEAD /v2/my-ubuntu/blobs/sha256:3b37166ec61459e76e33282dda08f2a9cd698ca7e3d6bc44e6a6e7580cdeff8e HTTP/1.1" 404 157 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code="blob unknown" err.detail=sha256:ebbcacd28e101968415b0c812b2d2dc60f969e36b0b08c073bf796e12b1bb449 err.message="blob unknown to registry" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=30593896-9890-4d67-974c-96e3a4df11f2 http.request.method=HEAD http.request.remoteaddr="192.168.56.1:51545" http.request.uri="/v2/my-ubuntu/blobs/sha256:ebbcacd28e101968415b0c812b2d2dc60f969e36b0b08c073bf796e12b1bb449" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=11.2951ms http.response.status=404 http.response.written=157 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.digest="sha256:ebbcacd28e101968415b0c812b2d2dc60f969e36b0b08c073bf796e12b1bb449" vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "HEAD /v2/my-ubuntu/blobs/sha256:ebbcacd28e101968415b0c812b2d2dc60f969e36b0b08c073bf796e12b1bb449 HTTP/1.1" 404 157 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code="blob unknown" err.detail=sha256:2e3debadcbf7e542e2aefbce1b64a358b1931fb403b3e4aeca27cb4d809d56c2 err.message="blob unknown to registry" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=1368136f-0238-473e-bce3-976fc6e098cc http.request.method=HEAD http.request.remoteaddr="192.168.56.1:51542" http.request.uri="/v2/my-ubuntu/blobs/sha256:2e3debadcbf7e542e2aefbce1b64a358b1931fb403b3e4aeca27cb4d809d56c2" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=13.5235ms http.response.status=404 http.response.written=157 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.digest="sha256:2e3debadcbf7e542e2aefbce1b64a358b1931fb403b3e4aeca27cb4d809d56c2" vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "HEAD /v2/my-ubuntu/blobs/sha256:2e3debadcbf7e542e2aefbce1b64a358b1931fb403b3e4aeca27cb4d809d56c2 HTTP/1.1" 404 157 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code="blob unknown" err.detail=sha256:504facff238fde83f1ca8f9f54520b4219c5b8f80be9616ddc52d31448a044bd err.message="blob unknown to registry" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=eb7ca7fc-9216-4d44-8dd5-8daca8668d57 http.request.method=HEAD http.request.remoteaddr="192.168.56.1:51546" http.request.uri="/v2/my-ubuntu/blobs/sha256:504facff238fde83f1ca8f9f54520b4219c5b8f80be9616ddc52d31448a044bd" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=13.3585ms http.response.status=404 http.response.written=157 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.digest="sha256:504facff238fde83f1ca8f9f54520b4219c5b8f80be9616ddc52d31448a044bd" vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "HEAD /v2/my-ubuntu/blobs/sha256:504facff238fde83f1ca8f9f54520b4219c5b8f80be9616ddc52d31448a044bd HTTP/1.1" 404 157 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code="blob unknown" err.detail=sha256:c7fb3351ecad291a88b92b600037e2435c84a347683d540042086fe72c902b8a err.message="blob unknown to registry" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=0b5a0d8c-3aa8-4e55-afd5-3078298f9434 http.request.method=HEAD http.request.remoteaddr="192.168.56.1:51544" http.request.uri="/v2/my-ubuntu/blobs/sha256:c7fb3351ecad291a88b92b600037e2435c84a347683d540042086fe72c902b8a" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=8.8829ms http.response.status=404 http.response.written=157 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.digest="sha256:c7fb3351ecad291a88b92b600037e2435c84a347683d540042086fe72c902b8a" vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "HEAD /v2/my-ubuntu/blobs/sha256:c7fb3351ecad291a88b92b600037e2435c84a347683d540042086fe72c902b8a HTTP/1.1" 404 157 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: truncate /var/lib/registry/docker/registry/v2/repositories/my-ubuntu/_uploads/2a4e596b-cf98-4ff0-9ee0-1fc3653540fb/startedat: permission denied" err.message="unknown error" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=a21a557c-a77f-496b-aee3-e0531a33a4e5 http.request.method=POST http.request.remoteaddr="192.168.56.1:51552" http.request.uri="/v2/my-ubuntu/blobs/uploads/" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=26.8468ms http.response.status=500 http.response.written=258 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "POST /v2/my-ubuntu/blobs/uploads/ HTTP/1.1" 500 258 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: truncate /var/lib/registry/docker/registry/v2/repositories/my-ubuntu/_uploads/15ad6856-fa48-4e18-a069-2e3d202a2d7b/startedat: permission denied" err.message="unknown error" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=924bc3c0-2d5e-4191-bcba-ce36adafb24c http.request.method=POST http.request.remoteaddr="192.168.56.1:51556" http.request.uri="/v2/my-ubuntu/blobs/uploads/" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=20.1736ms http.response.status=500 http.response.written=258 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "POST /v2/my-ubuntu/blobs/uploads/ HTTP/1.1" 500 258 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: truncate /var/lib/registry/docker/registry/v2/repositories/my-ubuntu/_uploads/1985c4eb-2cf5-46f1-8473-ad06604df860/startedat: permission denied" err.message="unknown error" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=2d4e9aa4-e292-4551-ad53-e9620824eace http.request.method=POST http.request.remoteaddr="192.168.56.1:51553" http.request.uri="/v2/my-ubuntu/blobs/uploads/" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=26.5534ms http.response.status=500 http.response.written=258 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "POST /v2/my-ubuntu/blobs/uploads/ HTTP/1.1" 500 258 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: truncate /var/lib/registry/docker/registry/v2/repositories/my-ubuntu/_uploads/893d57e2-cf37-47d0-9bde-dbf5eacaf24a/startedat: permission denied" err.message="unknown error" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=5ced1169-7211-4017-b403-aeea962b0873 http.request.method=POST http.request.remoteaddr="192.168.56.1:51554" http.request.uri="/v2/my-ubuntu/blobs/uploads/" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=23.4201ms http.response.status=500 http.response.written=258 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "POST /v2/my-ubuntu/blobs/uploads/ HTTP/1.1" 500 258 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"
time="2018-09-27T08:06:43Z" level=error msg="response completed with error" err.code=unknown err.detail="filesystem: truncate /var/lib/registry/docker/registry/v2/repositories/my-ubuntu/_uploads/0ccedb7b-4e8d-4e16-bc86-2a9940f944b8/startedat: permission denied" err.message="unknown error" go.version=go1.7.6 http.request.host="localhost:5000" http.request.id=e5d508bc-5b5a-47ca-8468-9c109958f8cf http.request.method=POST http.request.remoteaddr="192.168.56.1:51555" http.request.uri="/v2/my-ubuntu/blobs/uploads/" http.request.useragent="docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=22.8238ms http.response.status=500 http.response.written=258 instance.id=1f36054e-7e76-4757-af00-0ec2b50701d9 vars.name=my-ubuntu version=v2.6.2
192.168.56.1 - - [27/Sep/2018:08:06:43 +0000] "POST /v2/my-ubuntu/blobs/uploads/ HTTP/1.1" 500 258 "" "docker/18.06.1-ce go/go1.10.3 git-commit/e68fc7a os/windows arch/amd64 UpstreamClient(Docker-Client/18.06.1-ce \\(windows\\))"```