Unable to find docker image locally

Posting my solution since non of the above worked. Working on macbook M1 pro.

The issue I had is that the image was built as arm/64. And I was running the command:

docker run --platform=linux/amd64 ...

So I had to build the image for amd/64 platform in order to run it.

Command below:

docker buildx build --platform=linux/amd64 ...

In conclusion your docker image platform and docker run platform needs to be the same from what I experienced.


In my case, the docker image did exist on the system and still I couldn't run the container locally, so I used the exact image ID instead of image name and tag, like this:

docker run myContainer c29150c8588e

In my case, my image had TAG specified with it and I was not using it.

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
testimage          testtag            189b7354c60a        13 hours ago        88.3MB

Unable to find image 'testimage:latest' locally for this command docker run testimage

So specifying tag like this - docker run testimage:testtag worked for me


Well this is anti-logical but still sharing so future people like me don't get stuck

So the problem was that I was trying to run a docker image which doesn't exist.

I needed to build the image:

docker build . -t xameeramir/cra-docker

And then run it:

docker run -p 8080:80 xameeramir/cra-docker