question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error trying to connect to Docker daemon socket when building

See original GitHub issue

Trying out the basic commands with the empty / default app. When running briefcase build, I get:

$ briefcase build

Ensure we have the linuxdeploy AppImage...
linuxdeploy-x86_64.AppImage already downloaded

[pub-ex] Building AppImage...

[pub-ex] Entering Docker context...
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

Error while building app pub-ex.

This isn’t really an error / fault of briefcase - it’s because when I installed docker initially I didn’t bother to do the post install step of making a new group so I could call docker without sudo (documented here: https://docs.docker.com/engine/install/linux-postinstall/ or the helpful SO answer here: https://stackoverflow.com/questions/21871479/docker-cant-connect-to-docker-daemon ).

But it is relatively common (judging by personal experience + number of similar stack overflow posts), maybe the error message could include a mention / link to that? Or the briefcase docs? Or mention the --no-docker flag? [The building docs here (https://docs.beeware.org/en/latest/tutorial/tutorial-3.html#building-your-application) mention that docker is used to build but it’s relatively sparse - I only noticed the --no-docker flag grepping around in the source to see if I could hack in adding a sudo to the front of the docker commands just to get it to work]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
freakboy3742commented, Jul 9, 2020

Fixed by #443.

0reactions
pinghedmcommented, Jul 7, 2020

Oh, yes both great points

I’m not 100% sure the same class of error does happen on those OS’s (they both run docker differently with a VM intermediary, is my limited understanding? At least they don’t have the equivalent steps in their install instructions in dockers docs) but point taken about it needing to be cross-platform regardless - adding a check that would just break on the other systems would not be good 😃.

The daemon not running at all is a great check too, I’ll mess around with that too.

Alright I’ll at least sketch out a solution with docker info to start!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix docker: Got permission denied while trying to ...
I've just installed docker but I have to run it with sudo every time. ... denied while trying to connect to the Docker...
Read more >
How to Resolve the “cannot connect to the Docker daemon ...
1. First, check if the Docker engine is running: sudo service docker status · 2. If the Docker engine isn't working, start it...
Read more >
How to Fix Docker Permission Denied Error on Ubuntu
Fixing 'Got permission denied while trying to connect to the Docker daemon socket' error with Docker in Ubuntu.
Read more >
Solving Docker permission denied while trying to connect to ...
The error message tells you that your current user can't access the docker engine, because you're lacking permissions to access the unix socket...
Read more >
Cannot Connect to a Docker Daemon - Baeldung
In this tutorial, we'll learn about the Docker daemon connectivity issue. This is a very common error that beginners encounter. We'll also look ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found