简体   繁体   English

错误:postgress 的拉取访问被拒绝,存储库不存在或可能需要“docker 登录”:拒绝:请求的资源访问被拒绝

[英]ERROR: pull access denied for postgress, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

While learning Docker using Django I got some problem related to installing PostgreSQL in Linux Mint.在使用 Django 学习 Docker 时,我遇到了一些与在 Linux Mint 中安装 PostgreSQL 相关的问题。

This is the code from file docker-compose.yml这是来自文件docker-compose.yml的代码

version: '3.7'

services: 
    web:
        build: .
        command: python /code/manage.py runserver 0.0.0.0:8000
        volumes: 
            - .:/code
        ports: 
            - 8000:8000
        depends_on: 
            - db

    db:
        image: postgress:11

Error that I'm receiving while firing docker-compose up -d command我在执行docker-compose up -d命令时收到的错误

Pulling db (postgress:)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]y
Pulling db (postgress:)...
ERROR: pull access denied for postgress, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

This error still raises after login in docker.登录 docker 后仍会出现此错误。

I don't think there is an issue related to docker-login instead you've a typo in your file at image name which is postgress:11 (extra s )我不认为存在与 docker-login 相关的问题,而是您的文件中的图像名称有拼写错误,即 postgress:11 (额外s

see: https://hub.docker.com/_/postgres见: https : //hub.docker.com/_/postgres

Updated compose file更新的撰写文件

version: '3.7'

services: 
    web:
        build: .
        command: python /code/manage.py runserver 0.0.0.0:8000
        volumes: 
            - .:/code
        ports: 
            - 8000:8000
        depends_on: 
            - db

    db:
        image: postgres:11

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM