Hi,

Roel Janssen <r...@gnu.org> 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