在学习使用 Django 进行 Docker 时,我遇到了在 Linux Mint 中安装 PostgreSQL 的一些问题。
这是来自文件 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
我收到的错误信息是在执行 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
在使用 Docker 登录后,仍会出现此错误。