Getting permission denied in heroku container login

1.1k Views Asked by At

I was trying to deploy my flask backend in heroku with docker. But when I run the command

heroku container:login

Getting those error

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix /var/run/docker.sock: connect: permission denied ▸ Login failed with: 1

My heroku.yml file in the top level directory is

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
1

There are 1 best solutions below

0
On

try this, it work for me

$ sudo heroku login && sudo heroku container:login