[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/14: scripts: system: Deprecate the docker-image command.
From: |
guix-commits |
Subject: |
07/14: scripts: system: Deprecate the docker-image command. |
Date: |
Thu, 23 Dec 2021 04:55:05 -0500 (EST) |
mothacehe pushed a commit to branch master
in repository guix.
commit 3ed8ddd606b5465bc502204f8a7fc4389ca9ab3f
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Thu Dec 16 10:09:17 2021 +0100
scripts: system: Deprecate the docker-image command.
* guix/scripts/system.scm (system-derivation-for-action): Use the image API
to
generate the docker images and deprecate the docker-image command.
(process-action): Ditto.
* doc/guix.texi (Invoking guix system): Adapt it.
---
doc/guix.texi | 19 +++++--------------
guix/scripts/system.scm | 22 ++++++++++++----------
2 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index c40d153..41fee35 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35039,15 +35039,6 @@ QEMU monitor and the VM.
@cindex System images, creation in various formats
@cindex Creating system images in various formats
@item image
-@itemx docker-image
-Return a virtual machine, disk image, or Docker image of the operating
-system declared in @var{file} that stands alone. By default,
-@command{guix system} estimates the size of the image needed to store
-the system, but you can use the @option{--image-size} option to specify
-a value. Docker images are built to contain exactly what they need, so
-the @option{--image-size} option is ignored in the case of
-@code{docker-image}.
-
@cindex image, creating disk images
The @code{image} command can produce various image types. The
image type can be selected using the @option{--image-type} option. It
@@ -35093,11 +35084,11 @@ uses the SeaBIOS BIOS by default, expecting a
bootloader to be installed
in the Master Boot Record (MBR).
@cindex docker-image, creating docker images
-When using @code{docker-image}, a Docker image is produced. Guix builds
-the image from scratch, not from a pre-existing Docker base image. As a
-result, it contains @emph{exactly} what you define in the operating
-system configuration file. You can then load the image and launch a
-Docker container using commands like the following:
+When using the @code{docker} image type, a Docker image is produced.
+Guix builds the image from scratch, not from a pre-existing Docker base
+image. As a result, it contains @emph{exactly} what you define in the
+operating system configuration file. You can then load the image and
+launch a Docker container using commands like the following:
@example
image_id="$(docker load < guix-system-docker-image.tar.gz)"
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 1db788a..a5d9bb4 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -713,16 +713,14 @@ checking this by themselves in their 'check' procedure."
image-size
(* 70 (expt 2 20)))
#:mappings mappings))
- ((image disk-image vm-image)
+ ((image disk-image vm-image docker-image)
(when (eq? action 'disk-image)
(warning (G_ "'disk-image' is deprecated: use 'image' instead~%")))
(when (eq? action 'vm-image)
(warning (G_ "'vm-image' is deprecated: use 'image' instead~%")))
- (lower-object (system-image image)))
- ((docker-image)
- (system-docker-image os
- #:memory-size 1024
- #:shared-network? container-shared-network?)))))
+ (when (eq? action 'docker-image)
+ (warning (G_ "'docker-image' is deprecated: use 'image' instead~%")))
+ (lower-object (system-image image))))))
(define (maybe-suggest-running-guix-pull)
"Suggest running 'guix pull' if this has never been done before."
@@ -1214,11 +1212,14 @@ resulting from command-line parsing."
(label (assoc-ref opts 'label))
(image-type (lookup-image-type-by-name
(assoc-ref opts 'image-type)))
- (image (let* ((image-type (if (eq? action 'vm-image)
- qcow2-image-type
- image-type))
+ (image (let* ((image-type (case action
+ ((vm-image) qcow2-image-type)
+ ((docker-image) docker-image-type)
+ (else image-type)))
(image-size (assoc-ref opts 'image-size))
(volatile? (assoc-ref opts 'volatile-root?))
+ (shared-network?
+ (assoc-ref opts 'container-shared-network?))
(base-image (if (operating-system? obj)
(os->image obj
#:type image-type)
@@ -1228,7 +1229,8 @@ resulting from command-line parsing."
(image-with-label base-image label)
base-image))
(size image-size)
- (volatile-root? volatile?))))
+ (volatile-root? volatile?)
+ (shared-network? shared-network?))))
(os (image-operating-system image))
(target-file (match args
((first second) second)
- 02/14: image: Add a shared-store? field., (continued)
- 02/14: image: Add a shared-store? field., guix-commits, 2021/12/23
- 03/14: image: Add a shared-network? field., guix-commits, 2021/12/23
- 04/14: system: image: Add docker support., guix-commits, 2021/12/23
- 08/14: scripts: system: Pass the volatile field to VM generation., guix-commits, 2021/12/23
- 11/14: services: nfs: Fix statd and mountd ports., guix-commits, 2021/12/23
- 12/14: tests: nfs: Fix nfs-root-fs test., guix-commits, 2021/12/23
- 13/14: scripts: system: Add a missing module., guix-commits, 2021/12/23
- 05/14: system: vm: Use the image API to generate QEMU images., guix-commits, 2021/12/23
- 06/14: Remove VM generation dead-code., guix-commits, 2021/12/23
- 09/14: scripts: system: Use the disk-image size argument for VM generation., guix-commits, 2021/12/23
- 07/14: scripts: system: Deprecate the docker-image command.,
guix-commits <=
- 14/14: tests: reconfigure: Fix it., guix-commits, 2021/12/23
- 10/14: tests: docker: Fix it., guix-commits, 2021/12/23