* ‘guix pack’ & entry point
@ 2017-09-28 14:47 Ludovic Courtès
2017-09-29 8:40 ` Vincent Legoll
2017-09-29 9:58 ` Ricardo Wurmus
0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-09-28 14:47 UTC (permalink / raw)
To: guix-devel
Hello Guix!
Things like the Docker image format¹ that ‘guix pack’ can produce have a
notion of an “entry point”. The entry point is an executable that is
invoked when one runs “docker run” (I think) without any argument.
Currently ‘guix pack’ doesn’t specify an entry point, but perhaps it
should? That would make it easier to “run” a pack.
If it did, what should the UI look like? Should it be:
guix pack -f docker --entry-point=bin/lstopo hwloc
which would mean that the entry point is ‘bin/lstopo’ in the profile. I
suppose it would be too inflexible in practice, because people might
want to run programs that are not part of a package.
Then, should it be:
guix pack -f docker --entry-point=./entry-point.sh hwloc
where ‘entry-point.sh’ would be added to the store? The entry point
would probably have to be executed after etc/profile has been sourced.
Internally, at the API level, the entry point should probably be a
gexp. That would make it easy to embark GuixSD if needed.
Thoughts?
Bonus: what would the tarball backend do with the entry point? Ignore it?
Ludo’.
¹ https://github.com/moby/moby/blob/master/image/spec/v1.2.md
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ‘guix pack’ & entry point
2017-09-28 14:47 ‘guix pack’ & entry point Ludovic Courtès
@ 2017-09-29 8:40 ` Vincent Legoll
2017-09-29 9:58 ` Ricardo Wurmus
1 sibling, 0 replies; 4+ messages in thread
From: Vincent Legoll @ 2017-09-29 8:40 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Hello,
I think you're speaking of the "CMD" entry from the Dockerfile.
You can specify a shell commandline, not just a single executable.
This is nice and very useful because you sometimes don't want to
embed a shell script to launch a simple pipeline.
--
Vincent Legoll
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ‘guix pack’ & entry point
2017-09-28 14:47 ‘guix pack’ & entry point Ludovic Courtès
2017-09-29 8:40 ` Vincent Legoll
@ 2017-09-29 9:58 ` Ricardo Wurmus
2017-09-29 11:58 ` Ludovic Courtès
1 sibling, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2017-09-29 9:58 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès <ludovic.courtes@inria.fr> writes:
> Bonus: what would the tarball backend do with the entry point? Ignore it?
It should end up as a script in the tarball IMO.
Maybe we want a more general feature here. For example, we had the
problem that /etc/environment is not actually sourced by default. Maybe
what we need is a way to start services that are then configured like
any other shepherd service…? Or is this too much?
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ‘guix pack’ & entry point
2017-09-29 9:58 ` Ricardo Wurmus
@ 2017-09-29 11:58 ` Ludovic Courtès
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-09-29 11:58 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
Ricardo Wurmus <rekado@elephly.net> skribis:
> Ludovic Courtès <ludovic.courtes@inria.fr> writes:
>
>> Bonus: what would the tarball backend do with the entry point? Ignore it?
>
> It should end up as a script in the tarball IMO.
With an easily recognizable fixed name? Like /init or /run?
> Maybe we want a more general feature here. For example, we had the
> problem that /etc/environment is not actually sourced by default. Maybe
> what we need is a way to start services that are then configured like
> any other shepherd service…? Or is this too much?
I think it could be useful, but it’s a special case of the more general
notion of an “entry point”: a possible entry point could be ‘shepherd’,
but it doesn’t have to.
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-29 11:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28 14:47 ‘guix pack’ & entry point Ludovic Courtès
2017-09-29 8:40 ` Vincent Legoll
2017-09-29 9:58 ` Ricardo Wurmus
2017-09-29 11:58 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).