pull access denied repository does not exist or may require docker login

前端 未结 16 1873
悲哀的现实
悲哀的现实 2021-02-02 05:18

I am using Laravel 4.2 with docker. I setup it on local. It worked without any problem but when I am trying to setup online using same procedure then I am getting error

相关标签:
16条回答
  • 2021-02-02 05:34

    This error message might possibly indicate something else.

    In my case I defined another Docker-Image elsewhere from which the current Docker inherited its settings (docker-compos.yml):

    FROM my_own_image:latest
    

    The error message I got:

    qohelet$ docker-compose up
    Building web
    Step 1/22 : FROM my_own_image:latest
    ERROR: Service 'web' failed to build: pull access denied for my_own_image, repository does not exist or may require 'docker login'
    

    Due to a reinstall the previous Docker were gone and I couldn't build my docker using docker-compose up with this command:

    sudo docker build -t my_own_image:latest -f MyOwnImage.Dockerfile .
    

    In your specific case you might have defined your own php-docker.

    0 讨论(0)
  • 2021-02-02 05:35

    Try this in your docker-compose.yml file

    image: php:rc-zts-alpine
    
    0 讨论(0)
  • Docker might have lost the authentication data. So you'll have to reauthenticate with your registry provider. With AWS for example:

    aws ecr get-login --region us-west-2 --no-include-email
    

    And then copy and paste that resulting "docker login..." to authenticated docker.

    Source: Amazon ECR Registeries

    0 讨论(0)
  • 2021-02-02 05:39

    The message usually comes when you put the wrong image name. Please check your image if it exists on the Docker repository with the correct tag. It helped me.

    docker run -d -p 80:80 --name ngnix ngnix:latest
    Unable to find image 'ngnix:latest' locally
    docker: Error response from daemon: pull access denied for ngnix, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
    See 'docker run --help'.
    $ docker run -d -p 80:80 --name nginx nginx:latest
    Unable to find image 'nginx:latest' locally
    latest: Pulling from library/nginx
    
    0 讨论(0)
  • 2021-02-02 05:44

    I had the same issue when working with docker-composer. In my case it was an Amazon AWS ECR private registry. It seems to be a bug in docker-compose

    https://github.com/docker/compose/issues/1622#issuecomment-162988389

    After adding the full path "myrepo/myimage" to docker compose yaml

    image: xxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/myrepo:myimage

    it was all fine.

    0 讨论(0)
  • 2021-02-02 05:45

    Make sure the image exists in docker hub. To me, I was trying to pull MongoDB using the command docker run mongodb which is incorrect. In the docker hub, the image name is mongo.

    0 讨论(0)
提交回复
热议问题