Unable to find docker image locally

北城余情 提交于 2020-01-14 08:04:35

问题


I was following this post - the reference code is on GitHub. I have cloned the repository on my local.

The project has got a react app inside it. I'm trying to run it on my local following step 7 on the same post:

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

This returns:

Unable to find image 'shakyshane/cra-docker:latest' locally
docker: Error response from daemon: pull access denied for shakyshane/cra-docker, repository does not exist or may require 'docker login'.
See 'docker run --help'.

I tried login to docker again but looks like since it belongs to @shakyShane I cannot access it.

I idiotically tried npm start too but it's not a simple react app running on node - it's in the container and containers are not controlled by npm

Looks like docker pull shakyshane/cra-docker:latest throws this:

Error response from daemon: pull access denied for shakyshane/cra-docker, repository does not exist or may require 'docker login'

So the question is how do I run this docker image on my local mac machine?


回答1:


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



回答2:


shakyshane/cra-docker Does not exist in that user's repo https://hub.docker.com/u/shakyshane/



来源:https://stackoverflow.com/questions/56512769/unable-to-find-docker-image-locally

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