for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

"Error response from daemon: unknown image" when pulling an image from local registry and the tag contains the "owner" part

Open rimelek opened this issue 4 years ago • 5 comments

  • [x] I have tried with the latest version of Docker Desktop
  • [x] I have tried disabling enabled experimental features
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

The following command should work with Docker Desktop in case of local registry as it works on Linux with Docker CE

docker pull localhost:4000/owner/myimage

Actual behavior

It returns an error:

Using default tag: latest
Error response from daemon: unknown image in /v1.41/images/create?fromImage=localhost%3A4000%2Fowner%2Fmyimage&tag=latest

Information

  • macOS Version: Ventura 13.0
  • Intel chip or Apple chip: Apple
  • Docker Desktop Version: 4.13.1

The bug is always reproducable on my Mac and it happaned to others as well on the Docker Forum: https://forums.docker.com/t/docker-registry-error-response-from-daemon-unknown-image-in-v1-41-images-create-fromimage/130944/6

I found a similar issue which was also mentioned in the same topic, but I created this isue since I could not reproduce the other one: https://github.com/docker/for-mac/issues/6540

It happens only with Docker Desktop, but not (at least for me) in a Linux virtual machine running the same Docker CE version (20.10.20)

I also tried to run an HTTP server on the same port and see if there is any access log when I try to pull or push something (obviously I did not expect it to work) and when I did it on Linux using Docker CE, I got access logs. When I did it on Mac using Docker Desktop, I only got access logs when I pushed the image, not when I pulled.

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0014: are the backend processes running?
[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0012: is the VM networking working?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0019: is the com.docker.vmnetd process responding?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?
No fatal errors detected.

Steps to reproduce the behavior

  1. Go to https://docs.docker.com/registry/deploying/
  2. Run:
    docker run -d -p 4000:5000 --restart=always --name registry registry:2
    
  3. Configure the Docker Engine to accept the insecure registry
    {
        "insecure-registries": ["localhost:4000"]
    }
    
  4. Pull (for example) ubuntu:20.04 from Docker Hub
    docker pull ubuntu:20.04
    
  5. Retag the image:
    docker tag ubuntu:20.04 localhost:4000/owner/myimage
    
  6. Push the image
    docker push localhost:4000/owner/myimage
    
  7. Try to pull the image you just pushed
    docker pull localhost:4000/owner/myimage
    

You can try the same steps using an other image name without the "owner" part and that will work.

rimelek avatar Nov 05 '22 21:11 rimelek

The same bug is in Windows

budarin avatar Nov 05 '22 22:11 budarin

thanks for the report! I can reproduce this. Agreed that it's likely the same root cause as https://github.com/docker/for-mac/issues/6540 but want to confirm.

nicks avatar Nov 07 '22 05:11 nicks

The same issue for me. I am running the registry locally on the macOS Ventura M1 chip. I can tag and push to my local registry but I can't pull that image from it. The image exists in my local private docker registry file directory.

developinua avatar Nov 24 '22 14:11 developinua

Closing this issue because a fix has been released in Docker Desktop 4.15.0. See release notes for more details.

maxcleme avatar Dec 01 '22 16:12 maxcleme

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

docker-robott avatar Mar 05 '23 03:03 docker-robott