all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Dashyan <mail@davie.li>
To: Bone Baboon <bone.baboon@disroot.org>
Cc: help-guix@gnu.org
Subject: Re: Build docker image
Date: Sat, 17 Apr 2021 23:05:56 +0300	[thread overview]
Message-ID: <878s5g3cd7.fsf@davie.li> (raw)
In-Reply-To: <87r1jheb0y.fsf@disroot.org>


Bone Baboon writes:

> I am trying to build a docker image.
>
> I have added `docker` and `docker-cli` to my system configuration and
> reconfigured the system.  The `docker` command needs a docker daemon
> running.
>
> I have added the docker service to the system configuration file with
> `(service docker-service-type)` in the list of services.  When I try to
> reconfigure the system I get this error message "guix system: error:
> service 'dockerd' requires 'networking', which is not provided by any
> service".

Hey Bone Baboon!

It is not 100% clear from your message how do you want to build a docker
image.  I'm assuming that you want to use standard docker tooling and
you want to have docker daemon on YOUR system.  Correct me I'm wrong
here.

Dockder service is one of the services that extends
shepherd-root-service-type.  They form dependency graph which is
different from extension graph you might have red in guix manual.  Each
shepherd service has "provision" field that defines list of simbols that
it provides and "requirement" field (defaulting to '()) that defines
which services it requeres to run.  Shepherd uses this information to
spawn services in right order.  But in your case procedure
assert-valid-graph (found in guix) warned you that graph is invalid
instead of producing shepherd configuration that will fail when you will
boot.

So. You need a service that provisionts 'networking!  You should
probably just use %desktop-services service list like so in your
config. It contains bunch of services you normaly need including
network-manager-service.

(operating-system
  ...
  (services
   (append
    (list
     ;; list of your services goes here
     (service xfce-desktop-service-type) ;; your wm of choice
     (service docker-service-type)) ;; docker daemon
    %desktop-services)))


> I have added `docker` and `docker-cli` to my system configuration and
> reconfigured the system.  The `docker` command needs a docker daemon
> running.
Note also that you dont need to add packages to system configuration to
use them.  You could just install it for your user profile.

But there are other ways to build docker images on guix like

guix system vm docker-image yourconf.scm

or

guix pack -f docker -S /bin=bin

Check out info manual for these comands in guix if you havent yet :)

-- 
David aka zzappie


  reply	other threads:[~2021-04-17 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-11  3:49 Build docker image Bone Baboon
2021-04-17 20:05 ` David Dashyan [this message]
2021-04-19  3:27   ` Bone Baboon
2021-04-27 17:11     ` David Dashyan
2021-04-27 17:16       ` David Dashyan
2021-04-19  3:48 ` Bone Baboon

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s5g3cd7.fsf@davie.li \
    --to=mail@davie.li \
    --cc=bone.baboon@disroot.org \
    --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.
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.