From b2383ba442cf9ece31a96003a893f691ba6ef633 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sun, 14 May 2023 22:15:43 +0000 Subject: [PATCH] feat: add container volumes list function --- distro/debian/debian.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/distro/debian/debian.go b/distro/debian/debian.go index f89cdd9..bfe6925 100644 --- a/distro/debian/debian.go +++ b/distro/debian/debian.go @@ -291,3 +291,13 @@ func ContainerKernels(d container.Image, kcfg *config.KernelConfig) (err error) return } + +func ContainerVolumes(pkgname, contname string) (volumes container.Volumes) { + pkgdir := filepath.Join("volumes", contname, pkgname) + + volumes.LibModules = config.Dir(pkgdir, "/lib/modules") + volumes.UsrSrc = config.Dir(pkgdir, "/usr/src") + volumes.Boot = config.Dir(pkgdir, "/boot") + + return +}