guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/04: pack: Allow setting a custom image tag for Docker images


From: guix-commits
Subject: 02/04: pack: Allow setting a custom image tag for Docker images
Date: Sat, 14 Oct 2023 09:59:29 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit 373ec2cf8ce97d5f89191c3d9211ee3a5c2067dc
Author: Sören Tempel <soeren@soeren-tempel.net>
AuthorDate: Sat Oct 14 11:38:56 2023 +0200

    pack: Allow setting a custom image tag for Docker images
    
    Previously, the image repository name was automatically computed from
    the packages in the manifest without allowing the user to set a custom
    one. As such, changing the packages in the manifest would result in a
    new image name. Thereby requiring updating documentation et cetera when
    using `docker load` directory on the resulting image.
    
    Inspired by `docker build -t`, this commit adds a new Docker-specific
    option to `guix pack` which allows setting a custom repository name for
    the resulting image. If this option is not specified, pack falls back
    to computing the name from the manifest. Therefore, this change is
    entirely backwards compatible.
    
    * guix/scripts/pack.scm (guix-pack): Add --image-tag option.
    (%docker-format-options): New constant.
    (show-docker-format-options): New procedure.
    (show-docker-format-options/detailed): New procedure.
    (docker-image): Allow setting a custom
    repository name for the created docker image via extra-options.
    * doc/guix.texi (Invoking guix pack)[docker]: Document --image-tag option.
    
    Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 doc/guix.texi | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 083504dcb8..3a9a909df8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7314,9 +7314,12 @@ specified binaries and symlinks.
 @item docker
 This produces a tarball that follows the
 @uref{https://github.com/docker/docker/blob/master/image/spec/v1.2.md,
-Docker Image Specification}.  The ``repository name'' as it appears in
-the output of the @command{docker images} command is computed from
-package names passed on the command line or in the manifest file.
+Docker Image Specification}.  By default, the ``repository name'' as it
+appears in the output of the @command{docker images} command is computed
+from package names passed on the command line or in the manifest file.
+Alternatively, the ``repository name'' can also be configured via the
+@option{--image-tag} option.  Refer to @option{--help-docker-format} for
+more information on such advanced options.
 
 @item squashfs
 This produces a SquashFS image containing all the specified binaries and



reply via email to

[Prev in Thread] Current Thread [Next in Thread]