mirror of
https://github.com/containers/podman.git
synced 2025-10-20 12:43:58 +08:00
Vendor c/common:8483ef6022b4
This commit vendor pre-release version of `c/common:8483ef6022b4`. It also adapts the code to the new `c/common/libimage` API, which fixes an image listing race that was listing false warnings. fixes: #23331 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
This commit is contained in:
7
vendor/github.com/containers/storage/Makefile
generated
vendored
7
vendor/github.com/containers/storage/Makefile
generated
vendored
@ -32,6 +32,11 @@ BUILDFLAGS := -tags "$(AUTOTAGS) $(TAGS)" $(FLAGS)
|
||||
GO ?= go
|
||||
TESTFLAGS := $(shell $(GO) test -race $(BUILDFLAGS) ./pkg/stringutils 2>&1 > /dev/null && echo -race)
|
||||
|
||||
# N/B: This value is managed by Renovate, manual changes are
|
||||
# possible, as long as they don't disturb the formatting
|
||||
# (i.e. DO NOT ADD A 'v' prefix!)
|
||||
GOLANGCI_LINT_VERSION := 1.60.2
|
||||
|
||||
default all: local-binary docs local-validate local-cross ## validate all checks, build and cross-build\nbinaries and docs
|
||||
|
||||
clean: ## remove all built files
|
||||
@ -74,7 +79,7 @@ local-validate validate: install.tools ## validate DCO on the host
|
||||
@./hack/git-validation.sh
|
||||
|
||||
install.tools:
|
||||
$(MAKE) -C tests/tools
|
||||
$(MAKE) -C tests/tools GOLANGCI_LINT_VERSION=$(GOLANGCI_LINT_VERSION)
|
||||
|
||||
install.docs: docs
|
||||
$(MAKE) -C docs install
|
||||
|
2
vendor/github.com/containers/storage/drivers/driver.go
generated
vendored
2
vendor/github.com/containers/storage/drivers/driver.go
generated
vendored
@ -496,7 +496,7 @@ func driverPut(driver ProtoDriver, id string, mainErr *error) {
|
||||
if *mainErr == nil {
|
||||
*mainErr = err
|
||||
} else {
|
||||
logrus.Errorf(err.Error())
|
||||
logrus.Error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
2
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
@ -1492,7 +1492,7 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
|
||||
if err := unix.Uname(&uts); err == nil {
|
||||
release = " " + string(uts.Release[:]) + " " + string(uts.Version[:])
|
||||
}
|
||||
logrus.StandardLogger().Logf(logLevel, "Ignoring global metacopy option, not supported with booted kernel"+release)
|
||||
logrus.StandardLogger().Logf(logLevel, "Ignoring global metacopy option, not supported with booted kernel %s", release)
|
||||
} else {
|
||||
logrus.Debugf("Ignoring global metacopy option, the mount program doesn't support it")
|
||||
}
|
||||
|
8
vendor/github.com/containers/storage/pkg/chrootarchive/archive.go
generated
vendored
8
vendor/github.com/containers/storage/pkg/chrootarchive/archive.go
generated
vendored
@ -83,6 +83,12 @@ func untarHandler(tarArchive io.Reader, dest string, options *archive.TarOptions
|
||||
}
|
||||
}
|
||||
|
||||
destVal, err := newUnpackDestination(root, dest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer destVal.Close()
|
||||
|
||||
r := tarArchive
|
||||
if decompress {
|
||||
decompressedArchive, err := archive.DecompressStream(tarArchive)
|
||||
@ -93,7 +99,7 @@ func untarHandler(tarArchive io.Reader, dest string, options *archive.TarOptions
|
||||
r = decompressedArchive
|
||||
}
|
||||
|
||||
return invokeUnpack(r, dest, options, root)
|
||||
return invokeUnpack(r, destVal, options)
|
||||
}
|
||||
|
||||
// Tar tars the requested path while chrooted to the specified root.
|
||||
|
22
vendor/github.com/containers/storage/pkg/chrootarchive/archive_darwin.go
generated
vendored
22
vendor/github.com/containers/storage/pkg/chrootarchive/archive_darwin.go
generated
vendored
@ -6,12 +6,26 @@ import (
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
)
|
||||
|
||||
type unpackDestination struct {
|
||||
dest string
|
||||
}
|
||||
|
||||
func (dst *unpackDestination) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// newUnpackDestination is a no-op on this platform
|
||||
func newUnpackDestination(root, dest string) (*unpackDestination, error) {
|
||||
return &unpackDestination{
|
||||
dest: dest,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func invokeUnpack(decompressedArchive io.Reader,
|
||||
dest string,
|
||||
options *archive.TarOptions, root string,
|
||||
dest *unpackDestination,
|
||||
options *archive.TarOptions,
|
||||
) error {
|
||||
_ = root // Restricting the operation to this root is not implemented on macOS
|
||||
return archive.Unpack(decompressedArchive, dest, options)
|
||||
return archive.Unpack(decompressedArchive, dest.dest, options)
|
||||
}
|
||||
|
||||
func invokePack(srcPath string, options *archive.TarOptions, root string) (io.ReadCloser, error) {
|
||||
|
89
vendor/github.com/containers/storage/pkg/chrootarchive/archive_unix.go
generated
vendored
89
vendor/github.com/containers/storage/pkg/chrootarchive/archive_unix.go
generated
vendored
@ -9,15 +9,41 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
"github.com/containers/storage/pkg/reexec"
|
||||
)
|
||||
|
||||
type unpackDestination struct {
|
||||
root *os.File
|
||||
dest string
|
||||
}
|
||||
|
||||
func (dst *unpackDestination) Close() error {
|
||||
return dst.root.Close()
|
||||
}
|
||||
|
||||
// tarOptionsDescriptor is passed as an extra file
|
||||
const tarOptionsDescriptor = 3
|
||||
|
||||
// rootFileDescriptor is passed as an extra file
|
||||
const rootFileDescriptor = 4
|
||||
|
||||
// procPathForFd gives us a string for a descriptor.
|
||||
// Note that while Linux supports actually *reading* this
|
||||
// path, FreeBSD and other platforms don't; but in this codebase
|
||||
// we only compare strings.
|
||||
func procPathForFd(fd int) string {
|
||||
return fmt.Sprintf("/proc/self/fd/%d", fd)
|
||||
}
|
||||
|
||||
// untar is the entry-point for storage-untar on re-exec. This is not used on
|
||||
// Windows as it does not support chroot, hence no point sandboxing through
|
||||
// chroot and rexec.
|
||||
@ -28,7 +54,7 @@ func untar() {
|
||||
var options archive.TarOptions
|
||||
|
||||
// read the options from the pipe "ExtraFiles"
|
||||
if err := json.NewDecoder(os.NewFile(3, "options")).Decode(&options); err != nil {
|
||||
if err := json.NewDecoder(os.NewFile(tarOptionsDescriptor, "options")).Decode(&options); err != nil {
|
||||
fatal(err)
|
||||
}
|
||||
|
||||
@ -38,7 +64,17 @@ func untar() {
|
||||
root = flag.Arg(1)
|
||||
}
|
||||
|
||||
if root == "" {
|
||||
// FreeBSD doesn't have proc/self, but we can handle it here
|
||||
if root == procPathForFd(rootFileDescriptor) {
|
||||
// Take ownership to ensure it's closed; no need to leak
|
||||
// this afterwards.
|
||||
rootFd := os.NewFile(rootFileDescriptor, "tar-root")
|
||||
defer rootFd.Close()
|
||||
if err := unix.Fchdir(int(rootFd.Fd())); err != nil {
|
||||
fatal(err)
|
||||
}
|
||||
root = "."
|
||||
} else if root == "" {
|
||||
root = dst
|
||||
}
|
||||
|
||||
@ -57,11 +93,35 @@ func untar() {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func invokeUnpack(decompressedArchive io.Reader, dest string, options *archive.TarOptions, root string) error {
|
||||
// newUnpackDestination takes a root directory and a destination which
|
||||
// must be underneath it, and returns an object that can unpack
|
||||
// in the target root using a file descriptor.
|
||||
func newUnpackDestination(root, dest string) (*unpackDestination, error) {
|
||||
if root == "" {
|
||||
return errors.New("must specify a root to chroot to")
|
||||
return nil, errors.New("must specify a root to chroot to")
|
||||
}
|
||||
relDest, err := filepath.Rel(root, dest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if relDest == "." {
|
||||
relDest = "/"
|
||||
}
|
||||
if relDest[0] != '/' {
|
||||
relDest = "/" + relDest
|
||||
}
|
||||
|
||||
rootfdRaw, err := unix.Open(root, unix.O_RDONLY|unix.O_DIRECTORY|unix.O_CLOEXEC, 0)
|
||||
if err != nil {
|
||||
return nil, &fs.PathError{Op: "open", Path: root, Err: err}
|
||||
}
|
||||
return &unpackDestination{
|
||||
root: os.NewFile(uintptr(rootfdRaw), "rootfs"),
|
||||
dest: relDest,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func invokeUnpack(decompressedArchive io.Reader, dest *unpackDestination, options *archive.TarOptions) error {
|
||||
// We can't pass a potentially large exclude list directly via cmd line
|
||||
// because we easily overrun the kernel's max argument/environment size
|
||||
// when the full image list is passed (e.g. when this is used by
|
||||
@ -72,24 +132,13 @@ func invokeUnpack(decompressedArchive io.Reader, dest string, options *archive.T
|
||||
return fmt.Errorf("untar pipe failure: %w", err)
|
||||
}
|
||||
|
||||
if root != "" {
|
||||
relDest, err := filepath.Rel(root, dest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if relDest == "." {
|
||||
relDest = "/"
|
||||
}
|
||||
if relDest[0] != '/' {
|
||||
relDest = "/" + relDest
|
||||
}
|
||||
dest = relDest
|
||||
}
|
||||
|
||||
cmd := reexec.Command("storage-untar", dest, root)
|
||||
cmd := reexec.Command("storage-untar", dest.dest, procPathForFd(rootFileDescriptor))
|
||||
cmd.Stdin = decompressedArchive
|
||||
|
||||
cmd.ExtraFiles = append(cmd.ExtraFiles, r)
|
||||
// If you change this, change tarOptionsDescriptor above
|
||||
cmd.ExtraFiles = append(cmd.ExtraFiles, r) // fd 3
|
||||
// If you change this, change rootFileDescriptor above too
|
||||
cmd.ExtraFiles = append(cmd.ExtraFiles, dest.root) // fd 4
|
||||
output := bytes.NewBuffer(nil)
|
||||
cmd.Stdout = output
|
||||
cmd.Stderr = output
|
||||
|
21
vendor/github.com/containers/storage/pkg/chrootarchive/archive_windows.go
generated
vendored
21
vendor/github.com/containers/storage/pkg/chrootarchive/archive_windows.go
generated
vendored
@ -7,19 +7,34 @@ import (
|
||||
"github.com/containers/storage/pkg/longpath"
|
||||
)
|
||||
|
||||
type unpackDestination struct {
|
||||
dest string
|
||||
}
|
||||
|
||||
func (dst *unpackDestination) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// newUnpackDestination is a no-op on this platform
|
||||
func newUnpackDestination(root, dest string) (*unpackDestination, error) {
|
||||
return &unpackDestination{
|
||||
dest: dest,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// chroot is not supported by Windows
|
||||
func chroot(path string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func invokeUnpack(decompressedArchive io.Reader,
|
||||
dest string,
|
||||
options *archive.TarOptions, root string,
|
||||
dest *unpackDestination,
|
||||
options *archive.TarOptions,
|
||||
) error {
|
||||
// Windows is different to Linux here because Windows does not support
|
||||
// chroot. Hence there is no point sandboxing a chrooted process to
|
||||
// do the unpack. We call inline instead within the daemon process.
|
||||
return archive.Unpack(decompressedArchive, longpath.AddPrefix(dest), options)
|
||||
return archive.Unpack(decompressedArchive, longpath.AddPrefix(dest.dest), options)
|
||||
}
|
||||
|
||||
func invokePack(srcPath string, options *archive.TarOptions, root string) (io.ReadCloser, error) {
|
||||
|
28
vendor/github.com/containers/storage/pkg/loopback/attach_loopback.go
generated
vendored
28
vendor/github.com/containers/storage/pkg/loopback/attach_loopback.go
generated
vendored
@ -41,11 +41,10 @@ func getNextFreeLoopbackIndex() (int, error) {
|
||||
return index, err
|
||||
}
|
||||
|
||||
func openNextAvailableLoopback(sparseName string, sparseFile *os.File) (loopFile *os.File, err error) {
|
||||
func openNextAvailableLoopback(sparseName string, sparseFile *os.File) (*os.File, error) {
|
||||
// Read information about the loopback file.
|
||||
var st syscall.Stat_t
|
||||
err = syscall.Fstat(int(sparseFile.Fd()), &st)
|
||||
if err != nil {
|
||||
if err := syscall.Fstat(int(sparseFile.Fd()), &st); err != nil {
|
||||
logrus.Errorf("Reading information about loopback file %s: %v", sparseName, err)
|
||||
return nil, ErrAttachLoopbackDevice
|
||||
}
|
||||
@ -70,7 +69,7 @@ func openNextAvailableLoopback(sparseName string, sparseFile *os.File) (loopFile
|
||||
target := fmt.Sprintf("/dev/loop%d", index)
|
||||
|
||||
// OpenFile adds O_CLOEXEC
|
||||
loopFile, err = os.OpenFile(target, os.O_RDWR, 0o644)
|
||||
loopFile, err := os.OpenFile(target, os.O_RDWR, 0o644)
|
||||
if err != nil {
|
||||
// The kernel returns ENXIO when opening a device that is in the "deleting" or "rundown" state, so
|
||||
// just treat ENXIO as if the device does not exist.
|
||||
@ -100,13 +99,12 @@ func openNextAvailableLoopback(sparseName string, sparseFile *os.File) (loopFile
|
||||
loopFile.Close()
|
||||
|
||||
// If the error is EBUSY, then try the next loopback
|
||||
if err != syscall.EBUSY {
|
||||
logrus.Errorf("Cannot set up loopback device %s: %s", target, err)
|
||||
return nil, ErrAttachLoopbackDevice
|
||||
if err == syscall.EBUSY {
|
||||
continue
|
||||
}
|
||||
|
||||
// Otherwise, we keep going with the loop
|
||||
continue
|
||||
logrus.Errorf("Cannot set up loopback device %s: %s", target, err)
|
||||
return nil, ErrAttachLoopbackDevice
|
||||
}
|
||||
|
||||
// Check if the loopback driver and underlying filesystem agree on the loopback file's
|
||||
@ -119,18 +117,8 @@ func openNextAvailableLoopback(sparseName string, sparseFile *os.File) (loopFile
|
||||
if dev != uint64(st.Dev) || ino != st.Ino {
|
||||
logrus.Errorf("Loopback device and filesystem disagree on device/inode for %q: %#x(%d):%#x(%d) vs %#x(%d):%#x(%d)", sparseName, dev, dev, ino, ino, st.Dev, st.Dev, st.Ino, st.Ino)
|
||||
}
|
||||
|
||||
// In case of success, we finished. Break the loop.
|
||||
break
|
||||
return loopFile, nil
|
||||
}
|
||||
|
||||
// This can't happen, but let's be sure
|
||||
if loopFile == nil {
|
||||
logrus.Errorf("Unreachable code reached! Error attaching %s to a loopback device.", sparseFile.Name())
|
||||
return nil, ErrAttachLoopbackDevice
|
||||
}
|
||||
|
||||
return loopFile, nil
|
||||
}
|
||||
|
||||
// AttachLoopDevice attaches the given sparse file to the next
|
||||
|
52
vendor/github.com/containers/storage/storage.conf
generated
vendored
52
vendor/github.com/containers/storage/storage.conf
generated
vendored
@ -54,32 +54,31 @@ graphroot = "/var/lib/containers/storage"
|
||||
additionalimagestores = [
|
||||
]
|
||||
|
||||
# Allows specification of how storage is populated when pulling images. This
|
||||
# option can speed the pulling process of images compressed with format
|
||||
# zstd:chunked. Containers/storage looks for files within images that are being
|
||||
# pulled from a container registry that were previously pulled to the host. It
|
||||
# can copy or create a hard link to the existing file when it finds them,
|
||||
# eliminating the need to pull them from the container registry. These options
|
||||
# can deduplicate pulling of content, disk storage of content and can allow the
|
||||
# kernel to use less memory when running containers.
|
||||
# Options controlling how storage is populated when pulling images.
|
||||
[storage.options.pull_options]
|
||||
# Enable the "zstd:chunked" feature, which allows partial pulls, reusing
|
||||
# content that already exists on the system. This is enabled by default,
|
||||
# but can be explicitly disabled. For more on zstd:chunked, see
|
||||
# https://github.com/containers/storage/blob/main/docs/containers-storage-zstd-chunked.md
|
||||
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
|
||||
# enable_partial_images = "true"
|
||||
|
||||
# containers/storage supports four keys
|
||||
# * enable_partial_images="true" | "false"
|
||||
# Tells containers/storage to look for files previously pulled in storage
|
||||
# rather then always pulling them from the container registry.
|
||||
# * use_hard_links = "false" | "true"
|
||||
# Tells containers/storage to use hard links rather then create new files in
|
||||
# the image, if an identical file already existed in storage.
|
||||
# * ostree_repos = ""
|
||||
# Tells containers/storage where an ostree repository exists that might have
|
||||
# previously pulled content which can be used when attempting to avoid
|
||||
# pulling content from the container registry
|
||||
# * convert_images = "false" | "true"
|
||||
# If set to true, containers/storage will convert images to a
|
||||
# format compatible with partial pulls in order to take advantage
|
||||
# of local deduplication and hard linking. It is an expensive
|
||||
# operation so it is not enabled by default.
|
||||
pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree_repos=""}
|
||||
# Tells containers/storage to use hard links rather then create new files in
|
||||
# the image, if an identical file already existed in storage.
|
||||
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
|
||||
# use_hard_links = "false"
|
||||
|
||||
# Path to an ostree repository that might have
|
||||
# previously pulled content which can be used when attempting to avoid
|
||||
# pulling content from the container registry
|
||||
# ostree_repos=""
|
||||
|
||||
# If set to "true", containers/storage will convert images to a
|
||||
# format compatible with partial pulls in order to take advantage
|
||||
# of local deduplication and hard linking. It is an expensive
|
||||
# operation so it is not enabled by default.
|
||||
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
|
||||
# convert_images = "false"
|
||||
|
||||
# Root-auto-userns-user is a user name which can be used to look up one or more UID/GID
|
||||
# ranges in the /etc/subuid and /etc/subgid file. These ranges will be partitioned
|
||||
@ -102,6 +101,7 @@ pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree
|
||||
# squashed down to the default uid in the container. These images will have no
|
||||
# separation between the users in the container. Only supported for the overlay
|
||||
# and vfs drivers.
|
||||
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
|
||||
#ignore_chown_errors = "false"
|
||||
|
||||
# Inodes is used to set a maximum inodes of the container image.
|
||||
@ -115,9 +115,11 @@ pull_options = {enable_partial_images = "true", use_hard_links = "false", ostree
|
||||
mountopt = "nodev"
|
||||
|
||||
# Set to skip a PRIVATE bind mount on the storage home directory.
|
||||
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
|
||||
# skip_mount_home = "false"
|
||||
|
||||
# Set to use composefs to mount data layers with overlay.
|
||||
# This is a "string bool": "false" | "true" (cannot be native TOML boolean)
|
||||
# use_composefs = "false"
|
||||
|
||||
# Size is used to set a maximum size of the container image.
|
||||
|
72
vendor/github.com/containers/storage/store.go
generated
vendored
72
vendor/github.com/containers/storage/store.go
generated
vendored
@ -84,6 +84,20 @@ type ApplyStagedLayerOptions struct {
|
||||
DiffOptions *drivers.ApplyDiffWithDifferOpts // Mandatory
|
||||
}
|
||||
|
||||
// MultiListOptions contains options to pass to MultiList
|
||||
type MultiListOptions struct {
|
||||
Images bool // if true, Images will be listed in the result
|
||||
Layers bool // if true, layers will be listed in the result
|
||||
Containers bool // if true, containers will be listed in the result
|
||||
}
|
||||
|
||||
// MultiListResult contains slices of Images, Layers or Containers listed by MultiList method
|
||||
type MultiListResult struct {
|
||||
Images []Image
|
||||
Layers []Layer
|
||||
Containers []Container
|
||||
}
|
||||
|
||||
// An roBigDataStore wraps up the read-only big-data related methods of the
|
||||
// various types of file-based lookaside stores that we implement.
|
||||
type roBigDataStore interface {
|
||||
@ -561,6 +575,12 @@ type Store interface {
|
||||
// usually by deleting layers and images which are damaged. If the
|
||||
// right options are set, it will remove containers as well.
|
||||
Repair(report CheckReport, options *RepairOptions) []error
|
||||
|
||||
// MultiList returns a MultiListResult structure that contains layer, image, or container
|
||||
// extracts according to the values in MultiListOptions.
|
||||
// MultiList returns consistent values as of a single point in time.
|
||||
// WARNING: The values may already be out of date by the time they are returned to the caller.
|
||||
MultiList(MultiListOptions) (MultiListResult, error)
|
||||
}
|
||||
|
||||
// AdditionalLayer represents a layer that is contained in the additional layer store
|
||||
@ -3815,3 +3835,55 @@ func (s *store) GarbageCollect() error {
|
||||
|
||||
return firstErr
|
||||
}
|
||||
|
||||
// List returns a MultiListResult structure that contains layer, image, or container
|
||||
// extracts according to the values in MultiListOptions.
|
||||
func (s *store) MultiList(options MultiListOptions) (MultiListResult, error) {
|
||||
// TODO: Possible optimization: Deduplicate content from multiple stores.
|
||||
out := MultiListResult{}
|
||||
|
||||
if options.Layers {
|
||||
layerStores, err := s.allLayerStores()
|
||||
if err != nil {
|
||||
return MultiListResult{}, err
|
||||
}
|
||||
for _, roStore := range layerStores {
|
||||
if err := roStore.startReading(); err != nil {
|
||||
return MultiListResult{}, err
|
||||
}
|
||||
defer roStore.stopReading()
|
||||
layers, err := roStore.Layers()
|
||||
if err != nil {
|
||||
return MultiListResult{}, err
|
||||
}
|
||||
out.Layers = append(out.Layers, layers...)
|
||||
}
|
||||
}
|
||||
|
||||
if options.Images {
|
||||
for _, roStore := range s.allImageStores() {
|
||||
if err := roStore.startReading(); err != nil {
|
||||
return MultiListResult{}, err
|
||||
}
|
||||
defer roStore.stopReading()
|
||||
|
||||
images, err := roStore.Images()
|
||||
if err != nil {
|
||||
return MultiListResult{}, err
|
||||
}
|
||||
out.Images = append(out.Images, images...)
|
||||
}
|
||||
}
|
||||
|
||||
if options.Containers {
|
||||
containers, _, err := readContainerStore(s, func() ([]Container, bool, error) {
|
||||
res, err := s.containerStore.Containers()
|
||||
return res, true, err
|
||||
})
|
||||
if err != nil {
|
||||
return MultiListResult{}, err
|
||||
}
|
||||
out.Containers = append(out.Containers, containers...)
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user