From: Rodrigo Morales <me@rodrigomorales.site>
To: <help-guix@gnu.org>
Subject: Error when trying to use "docker build"
Date: Fri, 12 Jan 2024 15:52:17 -0500 [thread overview]
Message-ID: <87h6jinuke.fsf@rodrigomorales.site> (raw)
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:"?
next reply other threads:[~2024-01-13 7:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 20:52 Rodrigo Morales [this message]
2024-01-17 1:26 ` Error when trying to use "docker build" Rodrigo Morales
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6jinuke.fsf@rodrigomorales.site \
--to=me@rodrigomorales.site \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).