* Error when trying to use "docker build"
@ 2024-01-12 20:52 Rodrigo Morales
2024-01-17 1:26 ` Rodrigo Morales
0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Morales @ 2024-01-12 20:52 UTC (permalink / raw)
To: help-guix
I'm using GuixSD and I'm learning how to use Docker. So, I want to use
Docker daemon under Guix.
I have added =docker-service-type= to my system configuration and
reconfigure my system.
I have created the following =Dockerfile=.
#+BEGIN_SRC sh
cat ~/e/foo/Dockerfile
#+END_SRC
#+RESULTS:
#+begin_example
FROM alpine:3.4
RUN apk update
RUN apk add vim
RUN apk add curl
#+end_example
When I try to use =docker build=, I get the following error:
#+BEGIN_SRC text
$ docker build -t my/docker-sample:1.0 .
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.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=my%2Fdocker-sample%3A1.0&target=&ulimits=null&version=1": dial unix /var/run/docker.sock: connect: permission denied
$ echo $?
1
#+END_SRC
I thought that adding my user to the =docker= group might solve the
problem, but it didn't (or at least not in my system). I also thought
that restarting the docker daemon using =sudo herd restart dockerd=
might solve the problem, but it didn't.
How to troubleshoot the error "Got permission denied while trying to
connect to the Docker daemon socket at unix:"?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Error when trying to use "docker build"
2024-01-12 20:52 Error when trying to use "docker build" Rodrigo Morales
@ 2024-01-17 1:26 ` Rodrigo Morales
0 siblings, 0 replies; 2+ messages in thread
From: Rodrigo Morales @ 2024-01-17 1:26 UTC (permalink / raw)
To: help-guix
Rodrigo Morales <me@rodrigomorales.site> writes:
> How to troubleshoot the error "Got permission denied while trying to
> connect to the Docker daemon socket at unix:"?
I solveod this problem by adding my user to the "docker" group and
logging in again.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-17 1:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-12 20:52 Error when trying to use "docker build" Rodrigo Morales
2024-01-17 1:26 ` Rodrigo Morales
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.