[Top][All Lists]

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

Docker image: from profile/manifest to manifest.scm?

From: zimoun
Subject: Docker image: from profile/manifest to manifest.scm?
Date: Wed, 23 Sep 2020 04:07:07 +0200


Sometimes ago, we discussed at length the consistency between
profile/manifest and the manifest.scm files.  And the conclusion –if I
remember correctly– was to have somehow a converter; Pierre proposed a

The command

  guix pack -f docker --save-provenance -m manifest.scm
builds the Docker image which can be directly loaded via “docker load”
and even pushed to Docker Hub (say with the tag “foo/bar”).  Then this
very image can be pulled with “docker pull foo/bar”.

Usually, the Docker images are big blobs and hard (nor impossible) to
reproduce with the Dockerfile.  However, the ones produced by Guix can
be reproduced later, even if the final user has only the opaque Docker
image.  Thanks to the option “–save-provenance”.

Well, I do not know to find the profile path with the Docker tools.
Does someone have a tip?

Let the image contains BusyBox, so:

   docker run -ti b0766a6f8a18 which emacs

says the profile is “gnu/store/…-profile”.  And note:

--8<---------------cut here---------------start------------->8---
$ guix gc -D $(docker run -ti b0766a6f8a18 which emacs)
finding garbage collector roots...
deleting `/gnu/store/trash'
deleting unused links...
note: currently hard linking saves 19558.10 MiB
--8<---------------cut here---------------end--------------->8---

The “profile/manifest“ is therefore available with:

--8<---------------cut here---------------start------------->8---
$ docker run -ti b0766a6f8a18 cat 
/gnu/store/d18kjh1922ya9xnmz6k3nnlqz71kzqr4-profile/manifest | head -n30
;; This file was automatically generated and is for internal use only.
;; It cannot be passed to the '--manifest' option.

  (version 3)
      (propagated-inputs ())
      (search-paths ())
            (version 0)
            (url "";)
            (branch "master")
                (version 0)
                  "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))))
--8<---------------cut here---------------end--------------->8---

The 2 questions are:

 1. How can I find this /gnu/store/…-profile/manifest file with only the
 Docker tools?

 2. What is the status of the converter from profile/manifest to
 manifest.scm discussed sometimes ago?

Thank you in advance.

All the best,

reply via email to

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