在学习Docker使用Django时,我遇到了一些与在LinuxMint中安装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后仍会出现此错误
我不认为存在与docker登录相关的问题,相反,您的文件中的图像名是postgress:11(extra
s
)见:https://hub.docker.com/_/postgres
更新的撰写文件
相关问题 更多 >
编程相关推荐