guix-devel
[Top][All Lists]
Advanced

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

Re: Creating Docker containers in Scheme


From: Ludovic Courtès
Subject: Re: Creating Docker containers in Scheme
Date: Wed, 08 Nov 2017 09:44:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi,

Roel Janssen <address@hidden> skribis:

> I'd like to create a Docker container from Scheme.  Looking at
> guix/scripts/pack.scm, I believe something like this should be possible:
>
>   (docker-image "my-container"
>     (profile-derivation
>       (packages->manifest (list hello coreutils))))

Move precisely:

  (mlet %store-monad ((profile (profile-derivation …)))
    (docker-image "my-container" profile))

> Is this something we could add to the the public interface of a module?

Sure.  For now the easiest solution would be to export ‘docker-image’
from (guix scripts pack).

Longer-term, we could rename (guix docker) to (guix build docker) and
move ‘docker-image’ to a new (guix docker) module, but perhaps we’d also
need a (guix pack) modules containing tools that are shared between the
docker and tarball backends of ‘guix pack’.

WDYT?

Ludo’.



reply via email to

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