all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Guix Devel <guix-devel@gnu.org>
Subject: Docker image: from profile/manifest to manifest.scm?
Date: Wed, 23 Sep 2020 04:07:07 +0200	[thread overview]
Message-ID: <86sgb9nt4k.fsf@gmail.com> (raw)

Dear,

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
draft.

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.

(manifest
  (version 3)
  (packages
    (("busybox"
      "1.31.1"
      "out"
      "/gnu/store/sz2k7vazy8dmsi1l6zw8ipx2bpwcwq3c-busybox-1.31.1"
      (propagated-inputs ())
      (search-paths ())
      (properties
        (provenance
          (repository
            (version 0)
            (url "https://git.savannah.gnu.org/git/guix.git")
            (branch "master")
            (commit
              "4a2cb3fa0e6384d7ad9f4cc7ca1fb46f63ebdb41")
            (introduction
              (channel-introduction
                (version 0)
                (commit
                  "9edb3f66fd807b096b48283debdcddccfea34bad")
                (signer
                  "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))))
     ("sassc"
      "3.6.1"
      "out"
[..]      
--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,
simon






             reply	other threads:[~2020-09-23  2:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23  2:07 zimoun [this message]
2020-09-23  8:32 ` Docker image: from profile/manifest to manifest.scm? Pierre Neidhardt
2020-09-24 17:26 ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86sgb9nt4k.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.