gpt4 book ai didi

docker - 在 heroku 容器登录中获取权限被拒绝

转载 作者:行者123 更新时间:2023-12-05 02:46:53 24 4
gpt4 key购买 nike

我试图用 docker 在 heroku 中部署我的 flask 后端。但是当我运行命令时

heroku container:login

得到那些错误

Got permission denied while trying to connect to the Docker daemonsocket at unix:///var/run/docker.sock: Gethttp://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix/var/run/docker.sock: connect: permission denied ▸ Login failedwith: 1

我在顶层目录的heroku.yml文件是

setup:
addons:
- plan: heroku-postgresql
as: DATABASE
build:
docker:
web: mymeds/Dockerfile
release:
image: web
command:
- ./release-tasks.sh
run:
web: python manage.py run

最佳答案

试试这个,它对我有用

$ sudo heroku login && sudo heroku container:login

关于docker - 在 heroku 容器登录中获取权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65279748/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com