2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-07-04 02:22:27 +00:00

add keep-cache option to preserve intermediate docker images

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2023-02-28 12:02:57 +01:00
committed by Adphi
parent 4780228c95
commit be88bc29f5
10 changed files with 53 additions and 13 deletions

View File

@ -114,6 +114,7 @@ var (
d2vm.WithSplitBoot(splitBoot),
d2vm.WithBootSize(bootSize),
d2vm.WithLuksPassword(luksPassword),
d2vm.WithKeepCache(keepCache),
); err != nil {
return err
}

View File

@ -102,6 +102,7 @@ var (
d2vm.WithSplitBoot(splitBoot),
d2vm.WithBootSize(bootSize),
d2vm.WithLuksPassword(luksPassword),
d2vm.WithKeepCache(keepCache),
); err != nil {
return err
}

View File

@ -36,6 +36,8 @@ var (
splitBoot bool
bootSize uint64
luksPassword string
keepCache bool
)
func buildFlags() *pflag.FlagSet {
@ -52,5 +54,6 @@ func buildFlags() *pflag.FlagSet {
flags.BoolVar(&splitBoot, "split-boot", false, "Split the boot partition from the root partition")
flags.Uint64Var(&bootSize, "boot-size", 100, "Size of the boot partition in MB")
flags.StringVar(&luksPassword, "luks-password", "", "Password to use for the LUKS encrypted root partition. If not set, the root partition will not be encrypted")
flags.BoolVar(&keepCache, "keep-cache", false, "Keep the images after the build")
return flags
}