help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: docker


From: Ricardo Wurmus
Subject: Re: docker
Date: Fri, 10 Jul 2020 14:09:47 +0200
User-agent: mu4e 1.4.10; emacs 26.3

Hi Roy,

> I would like to run a docker application on my guix system. However I need
> to have the docker daemon running. Do I simply add this to my config.scm
> file e.g:
>
> (use-modules (gnu) (docker) )

No, this would load the (gnu) module and the non-existant (docker)
module.  If we had a (docker) module this still wouldn’t do what you
want, as it would only make code available.

Please take a look at the Guix manual.  In section “8.8.31 Miscellaneous
Services” there is a heading “Docker Service” (I found this by hitting
“i” for “index” in my Info reader, followed by “docker”).  It says this:

--8<---------------cut here---------------start------------->8---
The ‘(gnu services docker)’ module provides the following services.

 -- Scheme Variable: docker-service-type

     This is the type of the service that runs Docker
     (https://www.docker.com), a daemon that can execute application
     bundles (sometimes referred to as “containers”) in isolated
     environments.

 -- Data Type: docker-configuration
     This is the data type representing the configuration of Docker and
     Containerd.

     ‘package’ (default: ‘docker’)
          The Docker package to use.

     ‘containerd’ (default: CONTAINERD)
          The Containerd package to use.

     ‘proxy’ (default DOCKER-LIBNETWORK-CMD-PROXY)
          The Docker user-land networking proxy package to use.

     ‘enable-proxy?’ (default ‘#f’)
          Enable or disable the use of the Docker user-land networking
          proxy.

     ‘debug?’ (default ‘#f’)
          Enable or disable debug output.
--8<---------------cut here---------------end--------------->8---

This is from a section on system services, so you’ll need to add
something like this to your configuration file:

--8<---------------cut here---------------start------------->8---
(use-modules (gnu services docker))
…
(operating-system
  …
  (services (cons* (service …)
                   (service …)
                   …
                   (service docker-service-type
                            (docker-configuration
                              (debug? #t)))
                   …))
  …)
--8<---------------cut here---------------end--------------->8---

If you don’t need any extra configuration “(service
docker-service-type)” should be sufficient.

-- 
Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]