From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 06 15:31:05 2019 Received: (at 33893) by debbugs.gnu.org; 6 Jan 2019 20:31:05 +0000 Received: from localhost ([127.0.0.1]:49045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggF4b-0006Xk-FI for submit@debbugs.gnu.org; Sun, 06 Jan 2019 15:31:05 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:39934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggF4Z-0006Xa-7C for 33893@debbugs.gnu.org; Sun, 06 Jan 2019 15:31:03 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9A59C1164; Sun, 6 Jan 2019 21:31:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cn-SzJJ6I8hY; Sun, 6 Jan 2019 21:31:01 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 6725EFA1; Sun, 6 Jan 2019 21:31:01 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Danny Milosavljevic Subject: Re: [bug#33893] [PATCH v5 3/4] services: Add docker. References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-4-dannym@scratchpost.org> Date: Sun, 06 Jan 2019 21:31:00 +0100 In-Reply-To: <20181230233903.23426-4-dannym@scratchpost.org> (Danny Milosavljevic's message of "Mon, 31 Dec 2018 00:39:02 +0100") Message-ID: <87ftu5y1dn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 33893 Cc: 33893@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Danny Milosavljevic skribis: > * gnu/services/docker.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * doc/guix.texi (Miscellaneous Services): Document the service. Nice! > +@cindex docker =E2=80=9CDocker=E2=80=9D with a capital. > +@subsubheading Docker Service > + > +The @code{(gnu services docker)} module provides the following service. > + > +@defvr {Scheme Variable} docker-service-type > + > +This is a service that runs @url{http://www.docker.com,Docker}, a daemon= that > +provides container functionality. > + We=E2=80=99re missing =E2=80=9C@end defvr=E2=80=9D I guess. I think we shouldn=E2=80=99t propagate the narrative that Docker =3D contai= ner. So what about something like: This is the type of the service that runs @url{=E2=80=A6, Docker}, a daem= on that can execute application bundles (sometimes referred to as ``containers'') in isolated environments. ? Also could you document =E2=80=98docker-configuration=E2=80=99 as well? [...] > +;; TODO: Refactor out into its own module? How to depend on it then? > +(define (containerd-shepherd-service config) > + (let* ((package (docker-configuration-containerd config))) > + (shepherd-service > + (documentation "containerd daemon.") > + (provision '(containerd)) > + (start #~(make-forkexec-constructor > + (list (string-append #$package "/bin/containerd")))) > + (stop #~(make-kill-destructor))))) I suppose there could be a separate =E2=80=98containerd-service-type=E2=80= =99 if it=E2=80=99s useful; if it=E2=80=99s not, it=E2=80=99s OK to keep it this way. As for the dependency, users would have to add both docker and containerd to their service list, or docker-service-type could extend containerd-service-type, which would ensure containerd-service-type is automatically instantiated if it=E2=80=99s not already in the user=E2=80=99= s service list. > +(define docker-service-type > + (service-type (name 'docker) > + (extensions > + (list > + (service-extension activation-service-type > + %docker-activation) > + (service-extension shepherd-root-service-type > + (lambda args > + (list (apply containerd-shepherd-= service args) > + (apply docker-shepherd-serv= ice args)))) You can make the above (lambda (config) =E2=80=A6) instead of (lambda (args= ) =E2=80=A6). > + (service-extension account-service-type > + (const %docker-accounts)))) > + (default-value (docker-configuration)))) Please add a =E2=80=98description=E2=80=99 field here, and please remove ta= bs from the file. :-) Could you consider adding a system test for docker/containerd? Perhaps we could go as far as using =E2=80=98docker-image=E2=80=99 in (guix scripts= pack) to generate an image and make sure =E2=80=98docker load=E2=80=99 works, but ma= ybe that=E2=80=99s too much work. Thank you, Ludo=E2=80=99.