all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* guix pack -f docker ...
@ 2019-03-01  1:12 Yoshinori Arai
  2019-03-01  7:48 ` Julien Lepiller
  0 siblings, 1 reply; 5+ messages in thread
From: Yoshinori Arai @ 2019-03-01  1:12 UTC (permalink / raw)
  To: help-guix


Hello,

I'm trying possibility of guix pack especially docker or squashfs for
singularity.

I have tried guix pack -f docker emacs geiser guile.
$ cp /gnu/store/ywrxbn8ik9bmj4xhd5yybwvs069v9vv9-docker-pack.tar.gz \
  ./emacs-geiser-guix.docker.tar.gz
$ docker load < emacs-geiser-guix.docker.tar.gz
$ docker images
REPOSITORY   TAG                               IMAGE ID      CREATED      SIZE
mongo        latest                            0da05d84b1fe  3 weeks ago  394MB
hello-world  latest                            fce289e99eb9  8 weeks ago  1.84kB
profile      zy3irqp7vsiyk28ns3xliakll07p9cz4  4dfc15f321bd  49 years ago 966MB
$ docker run -it --name my-emacs profile:zy3irqp7vsiyk28ns3xliakll07p9cz4 emacs
docker: Error response from daemon: OCI runtime create failed:
container_linux.go:344: starting container process caused "exec:
\"emacs\": executable file not found in $PATH": unknown.

I don't know about docker well.
This traial was on foreign distro debian 9. Docker was installed from debian.
Please tell me how to use guix pack -f docker ...

Thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guix pack -f docker ...
  2019-03-01  1:12 guix pack -f docker Yoshinori Arai
@ 2019-03-01  7:48 ` Julien Lepiller
  2019-03-01  9:24   ` zimoun
  2019-03-01 11:26   ` Yoshinori Arai
  0 siblings, 2 replies; 5+ messages in thread
From: Julien Lepiller @ 2019-03-01  7:48 UTC (permalink / raw)
  To: help-guix, Yoshinori Arai

Le 1 mars 2019 02:12:19 GMT+01:00, Yoshinori Arai <kumagusu08@gmail.com> a écrit :
>
>Hello,
>
>I'm trying possibility of guix pack especially docker or squashfs for
>singularity.
>
>I have tried guix pack -f docker emacs geiser guile.
>$ cp /gnu/store/ywrxbn8ik9bmj4xhd5yybwvs069v9vv9-docker-pack.tar.gz \
>  ./emacs-geiser-guix.docker.tar.gz
>$ docker load < emacs-geiser-guix.docker.tar.gz
>$ docker images
>REPOSITORY   TAG                               IMAGE ID      CREATED   
>  SIZE
>mongo        latest                            0da05d84b1fe  3 weeks
>ago  394MB
>hello-world  latest                            fce289e99eb9  8 weeks
>ago  1.84kB
>profile      zy3irqp7vsiyk28ns3xliakll07p9cz4  4dfc15f321bd  49 years
>ago 966MB
>$ docker run -it --name my-emacs
>profile:zy3irqp7vsiyk28ns3xliakll07p9cz4 emacs
>docker: Error response from daemon: OCI runtime create failed:
>container_linux.go:344: starting container process caused "exec:
>\"emacs\": executable file not found in $PATH": unknown.
>
>I don't know about docker well.
>This traial was on foreign distro debian 9. Docker was installed from
>debian.
>Please tell me how to use guix pack -f docker ...
>
>Thank you.

Hi,

I think you were doing fine, but you're missing one option. You should have run something like "guix pack -f docker -S /bin=bin". Acording to the manual:

For instance, -S /opt/gnu/bin=bin creates a /opt/gnu/bin symlink pointing to the bin sub-directory of the profile. 

Now emacs is available as /bin/emacs inside the container.

See https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-pack.html#Invoking-guix-pack for more details.

HTH

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guix pack -f docker ...
  2019-03-01  7:48 ` Julien Lepiller
@ 2019-03-01  9:24   ` zimoun
  2019-03-01 12:14     ` Yoshinori Arai
  2019-03-01 11:26   ` Yoshinori Arai
  1 sibling, 1 reply; 5+ messages in thread
From: zimoun @ 2019-03-01  9:24 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: help-guix

Hi Yoshinori Arai,

To add pointers, I recommend you this blog post [1] by Ludo presenting
`guix pack`.

[1] https://www.gnu.org/software/guix/blog/2017/creating-bundles-with-guix-pack/


Personally, I use something in this flavour:

      guix pack -f docker \
         -S /bin=bin -S /lib=lib -S /share=share  \
         emacs guile geiser

      docker load < /gnu/store/<hash>-docker-pack.tar.gz
      docker image ls
      docker run -ti <image-id> emacs

And depending on your Guix commit (version), the hashes/id should be different.

With `guix describe`, I have 89ea625, so `guix pull --commit=89ea625` then
 - <hash> is pg66wnjsg7yyxc0gi5wbrk8dz0i2jyfp
 - docker TAG is k2nml7smdflwzkgqhqnmy6s0lzambdvl
 - docker IMAGE ID is 560c357dd4e3


Hope that helps.


All the best
--
simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guix pack -f docker ...
  2019-03-01  7:48 ` Julien Lepiller
  2019-03-01  9:24   ` zimoun
@ 2019-03-01 11:26   ` Yoshinori Arai
  1 sibling, 0 replies; 5+ messages in thread
From: Yoshinori Arai @ 2019-03-01 11:26 UTC (permalink / raw)
  To: julien; +Cc: help-guix


Thank you.

I did not recognize that -S option is available for docker.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guix pack -f docker ...
  2019-03-01  9:24   ` zimoun
@ 2019-03-01 12:14     ` Yoshinori Arai
  0 siblings, 0 replies; 5+ messages in thread
From: Yoshinori Arai @ 2019-03-01 12:14 UTC (permalink / raw)
  To: zimon.toutoune; +Cc: help-guix


Thank you. I have succeeded.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-01 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-01  1:12 guix pack -f docker Yoshinori Arai
2019-03-01  7:48 ` Julien Lepiller
2019-03-01  9:24   ` zimoun
2019-03-01 12:14     ` Yoshinori Arai
2019-03-01 11:26   ` Yoshinori Arai

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.