Error trying to connect to Docker daemon socket when building
See original GitHub issueTrying 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:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Fixed by #443.
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!