* guix pack and exposing ports
@ 2021-08-18 21:00 Todor Kondić
2021-08-19 9:40 ` Edouard Klein
2021-08-20 8:20 ` zimoun
0 siblings, 2 replies; 4+ messages in thread
From: Todor Kondić @ 2021-08-18 21:00 UTC (permalink / raw)
To: help-guix\@gnu.org
Hello,
Please bear with me since I am not that very docker savvy. As far as I understand, normally, one can expose certain ports in a docker description file. But, how to do that when using `guix pack -f docker` command where the docker recipe is hidden from the user?
Also, I note I'm getting ~10 GiG image for a flimsy program depending on R and shiny. Somehow that doesn't feel right. :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: guix pack and exposing ports
2021-08-18 21:00 guix pack and exposing ports Todor Kondić
@ 2021-08-19 9:40 ` Edouard Klein
2021-08-19 9:54 ` Todor Kondić
2021-08-20 8:20 ` zimoun
1 sibling, 1 reply; 4+ messages in thread
From: Edouard Klein @ 2021-08-19 9:40 UTC (permalink / raw)
To: Todor Kondić; +Cc: help-guix
Hi !
From what I know, with guix pack you can only have the dependencies in
the docker image, but you won't have anything to start or manage your
software automatically. You need to invoke the correct command (with
docker run, I believe).
What you can do is create an operating-system declaration and use the
guix system docker-image subcommand. Note that this is way more
involved, as you need to create a shepherd service for your software.
I quickly ran into docker limitations following this route, but
depending on what you want to do this may be the way to go.
The alternative is to use the guix pack image as the base image in a
standard dockerfile.
As for the size of the image, see this thread
https://lists.gnu.org/archive/html/help-guix/2021-07/msg00064.html
Good luck
Todor Kondić writes:
> Hello,
>
> Please bear with me since I am not that very docker savvy. As far as I understand, normally, one can expose certain ports in a docker description file. But, how to do that when using `guix pack -f docker` command where the docker recipe is hidden from the user?
>
> Also, I note I'm getting ~10 GiG image for a flimsy program depending on R and shiny. Somehow that doesn't feel right. :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: guix pack and exposing ports
2021-08-19 9:40 ` Edouard Klein
@ 2021-08-19 9:54 ` Todor Kondić
0 siblings, 0 replies; 4+ messages in thread
From: Todor Kondić @ 2021-08-19 9:54 UTC (permalink / raw)
To: Edouard Klein; +Cc: help-guix
Thanks Edouard!
So far I'm trying to follow the route where additional things are built on top of the existing image. Also managed to trim the image to a very bearable ~150Mb once I trimmed the manifest to bare necessities.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, August 19th, 2021 at 11:40 AM, Edouard Klein <edou@rdklein.fr> wrote:
> Hi !
>
> From what I know, with guix pack you can only have the dependencies in
>
> the docker image, but you won't have anything to start or manage your
>
> software automatically. You need to invoke the correct command (with
>
> docker run, I believe).
>
> What you can do is create an operating-system declaration and use the
>
> guix system docker-image subcommand. Note that this is way more
>
> involved, as you need to create a shepherd service for your software.
>
> I quickly ran into docker limitations following this route, but
>
> depending on what you want to do this may be the way to go.
>
> The alternative is to use the guix pack image as the base image in a
>
> standard dockerfile.
>
> As for the size of the image, see this thread
>
> https://lists.gnu.org/archive/html/help-guix/2021-07/msg00064.html
>
> Good luck
>
> Todor Kondić writes:
>
> > Hello,
> >
> > Please bear with me since I am not that very docker savvy. As far as I understand, normally, one can expose certain ports in a docker description file. But, how to do that when using `guix pack -f docker` command where the docker recipe is hidden from the user?
> >
> > Also, I note I'm getting ~10 GiG image for a flimsy program depending on R and shiny. Somehow that doesn't feel right. :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: guix pack and exposing ports
2021-08-18 21:00 guix pack and exposing ports Todor Kondić
2021-08-19 9:40 ` Edouard Klein
@ 2021-08-20 8:20 ` zimoun
1 sibling, 0 replies; 4+ messages in thread
From: zimoun @ 2021-08-20 8:20 UTC (permalink / raw)
To: Todor Kondić, help-guix\@gnu.org
Hi,
In addition to Edouard’s answer. ;-)
On Wed, 18 Aug 2021 at 21:00, Todor Kondić <tk.code@protonmail.com> wrote:
> Also, I note I'm getting ~10 GiG image for a flimsy program depending
> on R and shiny. Somehow that doesn't feel right. :)
Well, it is a complicated topic. ;-) One thing is to carefully examine
the graph and then identify unnecessary (potentially) dependencies,
i.e., somehow create variant packages where the graph is drastically
cut. For instance, the package ’r-minimal’ brings TeXlive (mainly for
doc) and maybe it is not necessary for your use-case. You can use “guix
size” to identify the items.
On the other hand, “guix pack” can be optimized. For instance using
Docker layers, see:
<https://storage.googleapis.com/nixdoc/nixery-layers.html>
Chris did some work in this direction, IIRC. Maybe a patch is floating
around. :-)
All the best,
simon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-20 8:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-18 21:00 guix pack and exposing ports Todor Kondić
2021-08-19 9:40 ` Edouard Klein
2021-08-19 9:54 ` Todor Kondić
2021-08-20 8:20 ` zimoun
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.