* specify custom manifest->friendly-name for guix pack -f docker? @ 2023-01-18 20:40 Przemysław Kamiński via 2023-01-20 12:01 ` Simon Tournier 0 siblings, 1 reply; 5+ messages in thread From: Przemysław Kamiński via @ 2023-01-18 20:40 UTC (permalink / raw) To: help-guix [-- Attachment #1.1: Type: text/plain, Size: 1459 bytes --] Hello, I want to guix pack -f docker -m manifest.scm and get a nice image name. However, looking at the code I see [https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/pack.scm\#n618][https_git.savannah.gnu.org_cgit_guix.git_tree_guix_scripts_pack.scm_n618] and then the ugly loop [https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/pack.scm\#n155][https_git.savannah.gnu.org_cgit_guix.git_tree_guix_scripts_pack.scm_n155] that produces cryptic docker image names like bash-coreutils-r-zhs. Would it be possible to provide an option to specify that name? Current manifest record-type is a list of manifest entries: [https://git.savannah.gnu.org/cgit/guix.git/tree/guix/profiles.scm\#n205][https_git.savannah.gnu.org_cgit_guix.git_tree_guix_profiles.scm_n205] I guess adding a name property to manifest is too big of a change. Maybe then add an option to guix pack to accept optional name? And if not provided, fall back to manifest->friendly-name. Best, Przemek [https_git.savannah.gnu.org_cgit_guix.git_tree_guix_scripts_pack.scm_n618]: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/pack.scm#n618 [https_git.savannah.gnu.org_cgit_guix.git_tree_guix_scripts_pack.scm_n155]: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/pack.scm#n155 [https_git.savannah.gnu.org_cgit_guix.git_tree_guix_profiles.scm_n205]: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/profiles.scm#n205 [-- Attachment #1.2: attachment.sig --] [-- Type: application/pgp-signature, Size: 235 bytes --] [-- Attachment #1.3: publickey - EmailAddress(s=cgenie@pm.me) - 0x9CC42B0A.asc --] [-- Type: application/pgp-keys, Size: 682 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 249 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: specify custom manifest->friendly-name for guix pack -f docker? 2023-01-18 20:40 specify custom manifest->friendly-name for guix pack -f docker? Przemysław Kamiński via @ 2023-01-20 12:01 ` Simon Tournier 2023-01-20 15:07 ` Greg Hogan 0 siblings, 1 reply; 5+ messages in thread From: Simon Tournier @ 2023-01-20 12:01 UTC (permalink / raw) To: Przemysław Kamiński, help-guix Hi, On mer., 18 janv. 2023 at 20:40, Przemysław Kamiński via <help-guix@gnu.org> wrote: > that produces cryptic docker image names like bash-coreutils-r-zhs. Well, this is an improvement compared to the previous behaviour. :-) See 0074844366381e3056d09492b8b437836c7adb61: --8<---------------cut here---------------start------------->8--- pack: Provide a meaningful "repository name" for Docker. Previously, images produced by 'guix pack -f docker' would always show up as "profile" in the output of 'docker images'. With this change, 'docker images' shows a name constructed from the packages found in the image--e.g., "bash-coreutils-grep-sed". --8<---------------cut here---------------end--------------->8--- And one thing discussed at the time of this change was that the rename for a more meaningful name could append on the Docker side. That’s said… > Maybe then add an option to guix pack to accept optional name? And if not > provided, fall back to manifest->friendly-name. …yes, I agree. It could be nice to be able to directly name the image. However, this would mean that the produced Docker pack would not be bit-to-bit reproducible considering the same manifest. Other said, the bit-to-bit reproducibility would require three inputs: the channels.scm file describing the revision of Guix (and potentially other channels), the manifest.scm file describing the packages and also the name provided at Docker pack build-time. Cheers, simon ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: specify custom manifest->friendly-name for guix pack -f docker? 2023-01-20 12:01 ` Simon Tournier @ 2023-01-20 15:07 ` Greg Hogan 2023-01-20 17:15 ` Przemysław Kamiński via 2023-02-13 9:11 ` Simon Tournier 0 siblings, 2 replies; 5+ messages in thread From: Greg Hogan @ 2023-01-20 15:07 UTC (permalink / raw) To: Simon Tournier; +Cc: Przemysław Kamiński, help-guix On Fri, Jan 20, 2023 at 7:18 AM Simon Tournier <zimon.toutoune@gmail.com> wrote: > > > Maybe then add an option to guix pack to accept optional name? And if not > > provided, fall back to manifest->friendly-name. > > …yes, I agree. It could be nice to be able to directly name the image. > However, this would mean that the produced Docker pack would not be > bit-to-bit reproducible considering the same manifest. Other said, the > bit-to-bit reproducibility would require three inputs: the channels.scm > file describing the revision of Guix (and potentially other channels), > the manifest.scm file describing the packages and also the name provided > at Docker pack build-time. > > Cheers, > simon The image hash already depends on `guix pack` command-line options --entry-point, --save-provenance, and --symlink as well as package transformations, --no-grafts, and --system. Since building a bit-to-bit reproducible docker image already requires replaying the command-line options, adding an optional name would not reduce reproducibility. Greg ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: specify custom manifest->friendly-name for guix pack -f docker? 2023-01-20 15:07 ` Greg Hogan @ 2023-01-20 17:15 ` Przemysław Kamiński via 2023-02-13 9:11 ` Simon Tournier 1 sibling, 0 replies; 5+ messages in thread From: Przemysław Kamiński via @ 2023-01-20 17:15 UTC (permalink / raw) Cc: help-guix [-- Attachment #1.1: Type: text/plain, Size: 1541 bytes --] Or, just a wild idea: maybe make xspecirl" manifest entries that would modify Docker image? This actually would resemble the Dockerfile: name, entrypoint, package installs and custom script execution is done in one fine, streamlined. It seems a bit strange for me, for example, to specify things like entrypoint on the guix pack command line. Best, Przemek Sent from Proton Mail mobile \-------- Original Message -------- On Jan 20, 2023, 16:07, Greg Hogan < code@greghogan.com> wrote: > > On Fri, Jan 20, 2023 at 7:18 AM Simon Tournier wrote: > > > Maybe then add an option to guix pack to accept optional name? And if not > > provided, fall back to manifest->friendly-name. > > …yes, I agree. It could be nice to be able to directly name the image. > However, this would mean that the produced Docker pack would not be > bit-to-bit reproducible considering the same manifest. Other said, the > bit-to-bit reproducibility would require three inputs: the channels.scm > file describing the revision of Guix (and potentially other channels), > the manifest.scm file describing the packages and also the name provided > at Docker pack build-time. > > Cheers, > simon The image hash already depends on \`guix pack\` command-line options --entry-point, --save-provenance, and --symlink as well as package transformations, --no-grafts, and --system. Since building a bit-to-bit reproducible docker image already requires replaying the command-line options, adding an optional name would not reduce reproducibility. Greg [-- Attachment #1.2: publickey - EmailAddress(s=cgenie@pm.me) - 0x9CC42B0A.asc --] [-- Type: application/pgp-keys, Size: 682 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 249 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: specify custom manifest->friendly-name for guix pack -f docker? 2023-01-20 15:07 ` Greg Hogan 2023-01-20 17:15 ` Przemysław Kamiński via @ 2023-02-13 9:11 ` Simon Tournier 1 sibling, 0 replies; 5+ messages in thread From: Simon Tournier @ 2023-02-13 9:11 UTC (permalink / raw) To: Greg Hogan; +Cc: Przemysław Kamiński, help-guix Hi, On Fri, 20 Jan 2023 at 10:07, Greg Hogan <code@greghogan.com> wrote: > The image hash already depends on `guix pack` command-line options > --entry-point, --save-provenance, and --symlink as well as package > transformations, --no-grafts, and --system. Since building a > bit-to-bit reproducible docker image already requires replaying the > command-line options, adding an optional name would not reduce > reproducibility. I would be happy to review a patch in that direction. :-) Yeah, maybe it would help Docker folk to get how great Guix is for producing Docker stuff. Cheers, simon ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-13 10:38 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-01-18 20:40 specify custom manifest->friendly-name for guix pack -f docker? Przemysław Kamiński via 2023-01-20 12:01 ` Simon Tournier 2023-01-20 15:07 ` Greg Hogan 2023-01-20 17:15 ` Przemysław Kamiński via 2023-02-13 9:11 ` Simon Tournier
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).