summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/boltdb_state.go2
-rw-r--r--libpod/boltdb_state_internal.go4
-rw-r--r--libpod/boltdb_state_linux.go2
-rw-r--r--libpod/common_test.go4
-rw-r--r--libpod/container.go19
-rw-r--r--libpod/container_api.go6
-rw-r--r--libpod/container_commit.go8
-rw-r--r--libpod/container_exec.go4
-rw-r--r--libpod/container_graph.go2
-rw-r--r--libpod/container_graph_test.go2
-rw-r--r--libpod/container_inspect.go8
-rw-r--r--libpod/container_internal.go16
-rw-r--r--libpod/container_internal_linux.go77
-rw-r--r--libpod/container_internal_unsupported.go4
-rw-r--r--libpod/container_log.go4
-rw-r--r--libpod/container_log_linux.go2
-rw-r--r--libpod/container_log_unsupported.go4
-rw-r--r--libpod/container_top_linux.go4
-rw-r--r--libpod/container_top_unsupported.go2
-rw-r--r--libpod/container_validate.go4
-rw-r--r--libpod/define/container_inspect.go5
-rw-r--r--libpod/define/errors.go8
-rw-r--r--libpod/define/version.go2
-rw-r--r--libpod/diff.go2
-rw-r--r--libpod/events.go15
-rw-r--r--libpod/events/config.go3
-rw-r--r--libpod/events/filters.go2
-rw-r--r--libpod/events/journal_linux.go3
-rw-r--r--libpod/events/logfile.go17
-rw-r--r--libpod/events/nullout.go6
-rw-r--r--libpod/filters/containers.go8
-rw-r--r--libpod/filters/pods.go6
-rw-r--r--libpod/healthcheck.go2
-rw-r--r--libpod/healthcheck_linux.go4
-rw-r--r--libpod/healthcheck_unsupported.go2
-rw-r--r--libpod/image/docker_registry_options.go2
-rw-r--r--libpod/image/filters.go2
-rw-r--r--libpod/image/image.go10
-rw-r--r--libpod/image/image_test.go4
-rw-r--r--libpod/image/prune.go4
-rw-r--r--libpod/image/pull.go4
-rw-r--r--libpod/image/search.go2
-rw-r--r--libpod/in_memory_state.go4
-rw-r--r--libpod/info.go10
-rw-r--r--libpod/kube.go6
-rw-r--r--libpod/lock/file_lock_manager.go2
-rw-r--r--libpod/lock/shm_lock_manager_linux.go2
-rw-r--r--libpod/logs/log.go2
-rw-r--r--libpod/networking_linux.go10
-rw-r--r--libpod/networking_unsupported.go2
-rw-r--r--libpod/oci.go2
-rw-r--r--libpod/oci_attach_linux.go8
-rw-r--r--libpod/oci_attach_unsupported.go2
-rw-r--r--libpod/oci_conmon_exec_linux.go8
-rw-r--r--libpod/oci_conmon_linux.go14
-rw-r--r--libpod/oci_conmon_unsupported.go2
-rw-r--r--libpod/oci_missing.go2
-rw-r--r--libpod/oci_util.go2
-rw-r--r--libpod/options.go34
-rw-r--r--libpod/pod.go4
-rw-r--r--libpod/pod_api.go20
-rw-r--r--libpod/pod_internal.go2
-rw-r--r--libpod/pod_status.go2
-rw-r--r--libpod/pod_top_linux.go4
-rw-r--r--libpod/pod_top_unsupported.go2
-rw-r--r--libpod/reset.go6
-rw-r--r--libpod/runtime.go14
-rw-r--r--libpod/runtime_cstorage.go2
-rw-r--r--libpod/runtime_ctr.go8
-rw-r--r--libpod/runtime_img.go6
-rw-r--r--libpod/runtime_img_test.go2
-rw-r--r--libpod/runtime_migrate.go6
-rw-r--r--libpod/runtime_pod.go4
-rw-r--r--libpod/runtime_pod_infra_linux.go8
-rw-r--r--libpod/runtime_pod_linux.go8
-rw-r--r--libpod/runtime_pod_unsupported.go2
-rw-r--r--libpod/runtime_renumber.go2
-rw-r--r--libpod/runtime_volume.go4
-rw-r--r--libpod/runtime_volume_linux.go4
-rw-r--r--libpod/runtime_volume_unsupported.go2
-rw-r--r--libpod/state_test.go4
-rw-r--r--libpod/stats.go4
-rw-r--r--libpod/stats_unsupported.go2
-rw-r--r--libpod/storage.go2
-rw-r--r--libpod/util.go4
-rw-r--r--libpod/util_linux.go6
-rw-r--r--libpod/util_test.go2
-rw-r--r--libpod/util_unsupported.go2
-rw-r--r--libpod/volume.go4
-rw-r--r--libpod/volume_inspect.go2
-rw-r--r--libpod/volume_internal.go2
-rw-r--r--libpod/volume_internal_linux.go4
-rw-r--r--libpod/volume_internal_unsupported.go2
93 files changed, 337 insertions, 218 deletions
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go
index be2787670..38881d3e4 100644
--- a/libpod/boltdb_state.go
+++ b/libpod/boltdb_state.go
@@ -6,7 +6,7 @@ import (
"strings"
"sync"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go
index 70abbb39c..5b339e7c2 100644
--- a/libpod/boltdb_state_internal.go
+++ b/libpod/boltdb_state_internal.go
@@ -6,8 +6,8 @@ import (
"runtime"
"strings"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/rootless"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/boltdb_state_linux.go b/libpod/boltdb_state_linux.go
index 6ccda71bd..4fe0a3eaa 100644
--- a/libpod/boltdb_state_linux.go
+++ b/libpod/boltdb_state_linux.go
@@ -3,7 +3,7 @@
package libpod
import (
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/common_test.go b/libpod/common_test.go
index abf336f97..dff04af5c 100644
--- a/libpod/common_test.go
+++ b/libpod/common_test.go
@@ -8,8 +8,8 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/lock"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/lock"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/opencontainers/runtime-tools/generate"
"github.com/stretchr/testify/assert"
diff --git a/libpod/container.go b/libpod/container.go
index 20688e3ee..a71692dd8 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -13,11 +13,11 @@ import (
cnitypes "github.com/containernetworking/cni/pkg/types/current"
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/manifest"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/lock"
- "github.com/containers/libpod/pkg/namespaces"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/utils"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/lock"
+ "github.com/containers/libpod/v2/pkg/namespaces"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/utils"
"github.com/containers/storage"
"github.com/cri-o/ocicni/pkg/ocicni"
spec "github.com/opencontainers/runtime-spec/specs-go"
@@ -424,6 +424,10 @@ type ContainerConfig struct {
// to 0, 1, 2) that will be passed to the executed process. The total FDs
// passed will be 3 + PreserveFDs.
PreserveFDs uint `json:"preserveFds,omitempty"`
+
+ // Timezone is the timezone inside the container.
+ // Local means it has the same timezone as the host machine
+ Timezone string `json:"timezone,omitempty"`
}
// ContainerNamedVolume is a named volume that will be mounted into the
@@ -1248,3 +1252,8 @@ func (c *Container) AutoRemove() bool {
}
return c.Spec().Annotations[define.InspectAnnotationAutoremove] == define.InspectResponseTrue
}
+
+func (c *Container) Timezone() string {
+ return c.config.Timezone
+
+}
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 5e79763b6..b37b05ff2 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -10,9 +10,9 @@ import (
"sync"
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/libpod/logs"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/libpod/logs"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_commit.go b/libpod/container_commit.go
index fa6e95b38..e35ae1148 100644
--- a/libpod/container_commit.go
+++ b/libpod/container_commit.go
@@ -9,10 +9,10 @@ import (
"github.com/containers/buildah/util"
is "github.com/containers/image/v5/storage"
"github.com/containers/image/v5/types"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/libpod/image"
- libpodutil "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/libpod/image"
+ libpodutil "github.com/containers/libpod/v2/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/container_exec.go b/libpod/container_exec.go
index a0e8904dc..69da6fcfe 100644
--- a/libpod/container_exec.go
+++ b/libpod/container_exec.go
@@ -10,8 +10,8 @@ import (
"time"
"github.com/containers/common/pkg/capabilities"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
"github.com/containers/storage/pkg/stringid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_graph.go b/libpod/container_graph.go
index 97a12ec42..f38493b4e 100644
--- a/libpod/container_graph.go
+++ b/libpod/container_graph.go
@@ -4,7 +4,7 @@ import (
"context"
"strings"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/container_graph_test.go b/libpod/container_graph_test.go
index 38f03c59c..579b6eead 100644
--- a/libpod/container_graph_test.go
+++ b/libpod/container_graph_test.go
@@ -3,7 +3,7 @@ package libpod
import (
"testing"
- "github.com/containers/libpod/libpod/lock"
+ "github.com/containers/libpod/v2/libpod/lock"
"github.com/stretchr/testify/assert"
)
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index c6d9e1a65..94d5dc93b 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -5,9 +5,9 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/driver"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/driver"
+ "github.com/containers/libpod/v2/pkg/util"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
"github.com/opencontainers/runtime-tools/validate"
@@ -322,6 +322,8 @@ func (c *Container) generateInspectContainerConfig(spec *spec.Spec) *define.Insp
ctrConfig.CreateCommand = c.config.CreateCommand
+ ctrConfig.Timezone = c.config.Timezone
+
return ctrConfig
}
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 27b795871..7a547e565 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -12,14 +12,14 @@ import (
"strings"
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/cgroups"
- "github.com/containers/libpod/pkg/ctime"
- "github.com/containers/libpod/pkg/hooks"
- "github.com/containers/libpod/pkg/hooks/exec"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/selinux"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ "github.com/containers/libpod/v2/pkg/ctime"
+ "github.com/containers/libpod/v2/pkg/hooks"
+ "github.com/containers/libpod/v2/pkg/hooks/exec"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/selinux"
"github.com/containers/storage"
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/idtools"
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 2c78f6bd2..8bf6092c3 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -22,16 +22,16 @@ import (
"github.com/containers/buildah/pkg/secrets"
"github.com/containers/common/pkg/apparmor"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/annotations"
- "github.com/containers/libpod/pkg/cgroups"
- "github.com/containers/libpod/pkg/criu"
- "github.com/containers/libpod/pkg/lookup"
- "github.com/containers/libpod/pkg/resolvconf"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/util"
- "github.com/containers/libpod/utils"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/annotations"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ "github.com/containers/libpod/v2/pkg/criu"
+ "github.com/containers/libpod/v2/pkg/lookup"
+ "github.com/containers/libpod/v2/pkg/resolvconf"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/util"
+ "github.com/containers/libpod/v2/utils"
"github.com/containers/storage/pkg/archive"
securejoin "github.com/cyphar/filepath-securejoin"
"github.com/opencontainers/runc/libcontainer/user"
@@ -1241,6 +1241,31 @@ func (c *Container) makeBindMounts() error {
c.state.BindMounts["/etc/hostname"] = hostnamePath
}
+ // Make /etc/localtime
+ if c.Timezone() != "" {
+ if _, ok := c.state.BindMounts["/etc/localtime"]; !ok {
+ var zonePath string
+ if c.Timezone() == "local" {
+ zonePath, err = filepath.EvalSymlinks("/etc/localtime")
+ if err != nil {
+ return errors.Wrapf(err, "error finding local timezone for container %s", c.ID())
+ }
+ } else {
+ zone := filepath.Join("/usr/share/zoneinfo", c.Timezone())
+ zonePath, err = filepath.EvalSymlinks(zone)
+ if err != nil {
+ return errors.Wrapf(err, "error setting timezone for container %s", c.ID())
+ }
+ }
+ localtimePath, err := c.copyTimezoneFile(zonePath)
+ if err != nil {
+ return errors.Wrapf(err, "error setting timezone for container %s", c.ID())
+ }
+ c.state.BindMounts["/etc/localtime"] = localtimePath
+
+ }
+ }
+
// Make .containerenv
// Empty file, so no need to recreate if it exists
if _, ok := c.state.BindMounts["/run/.containerenv"]; !ok {
@@ -1533,3 +1558,35 @@ func (c *Container) getOCICgroupPath() (string, error) {
return "", errors.Wrapf(define.ErrInvalidArg, "invalid cgroup manager %s requested", c.runtime.config.Engine.CgroupManager)
}
}
+
+func (c *Container) copyTimezoneFile(zonePath string) (string, error) {
+ var localtimeCopy string = filepath.Join(c.state.RunDir, "localtime")
+ file, err := os.Stat(zonePath)
+ if err != nil {
+ return "", err
+ }
+ if file.IsDir() {
+ return "", errors.New("Invalid timezone: is a directory")
+ }
+ src, err := os.Open(zonePath)
+ if err != nil {
+ return "", err
+ }
+ defer src.Close()
+ dest, err := os.Create(localtimeCopy)
+ if err != nil {
+ return "", err
+ }
+ defer dest.Close()
+ _, err = io.Copy(dest, src)
+ if err != nil {
+ return "", err
+ }
+ if err := label.Relabel(localtimeCopy, c.config.MountLabel, false); err != nil {
+ return "", err
+ }
+ if err := dest.Chown(c.RootUID(), c.RootGID()); err != nil {
+ return "", err
+ }
+ return localtimeCopy, err
+}
diff --git a/libpod/container_internal_unsupported.go b/libpod/container_internal_unsupported.go
index 2a611c2d9..a42c1d735 100644
--- a/libpod/container_internal_unsupported.go
+++ b/libpod/container_internal_unsupported.go
@@ -5,8 +5,8 @@ package libpod
import (
"context"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/lookup"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/lookup"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
diff --git a/libpod/container_log.go b/libpod/container_log.go
index 67380397a..97936c683 100644
--- a/libpod/container_log.go
+++ b/libpod/container_log.go
@@ -5,8 +5,8 @@ import (
"os"
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/logs"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/logs"
"github.com/hpcloud/tail/watch"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go
index 03010d8ed..fad3bf87c 100644
--- a/libpod/container_log_linux.go
+++ b/libpod/container_log_linux.go
@@ -10,7 +10,7 @@ import (
"strings"
"time"
- "github.com/containers/libpod/libpod/logs"
+ "github.com/containers/libpod/v2/libpod/logs"
journal "github.com/coreos/go-systemd/v22/sdjournal"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_log_unsupported.go b/libpod/container_log_unsupported.go
index 2c4492b10..18882720a 100644
--- a/libpod/container_log_unsupported.go
+++ b/libpod/container_log_unsupported.go
@@ -3,8 +3,8 @@
package libpod
import (
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/logs"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/logs"
"github.com/pkg/errors"
)
diff --git a/libpod/container_top_linux.go b/libpod/container_top_linux.go
index 98a69966a..9a522e014 100644
--- a/libpod/container_top_linux.go
+++ b/libpod/container_top_linux.go
@@ -8,8 +8,8 @@ import (
"strconv"
"strings"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/rootless"
"github.com/containers/psgo"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/container_top_unsupported.go b/libpod/container_top_unsupported.go
index 12f6cbb6c..9c0cf0c1c 100644
--- a/libpod/container_top_unsupported.go
+++ b/libpod/container_top_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/libpod/libpod/define"
+import "github.com/containers/libpod/v2/libpod/define"
// Top gathers statistics about the running processes in a container. It returns a
// []string for output
diff --git a/libpod/container_validate.go b/libpod/container_validate.go
index a53a1839d..c02833359 100644
--- a/libpod/container_validate.go
+++ b/libpod/container_validate.go
@@ -1,8 +1,8 @@
package libpod
import (
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/rootless"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go
index 3fbeb8f0b..614882467 100644
--- a/libpod/define/container_inspect.go
+++ b/libpod/define/container_inspect.go
@@ -4,7 +4,7 @@ import (
"time"
"github.com/containers/image/v5/manifest"
- "github.com/containers/libpod/libpod/driver"
+ "github.com/containers/libpod/v2/libpod/driver"
)
// InspectContainerConfig holds further data about how a container was initially
@@ -54,6 +54,9 @@ type InspectContainerConfig struct {
// CreateCommand is the full command plus arguments of the process the
// container has been created with.
CreateCommand []string `json:"CreateCommand,omitempty"`
+ // Timezone is the timezone inside the container.
+ // Local means it has the same timezone as the host machine
+ Timezone string `json:"Timezone,omitempty"`
}
// InspectRestartPolicy holds information about the container's restart policy.
diff --git a/libpod/define/errors.go b/libpod/define/errors.go
index 98dc603d1..1e9179353 100644
--- a/libpod/define/errors.go
+++ b/libpod/define/errors.go
@@ -3,8 +3,8 @@ package define
import (
"errors"
- "github.com/containers/libpod/libpod/image"
- "github.com/containers/libpod/utils"
+ "github.com/containers/libpod/v2/libpod/image"
+ "github.com/containers/libpod/v2/utils"
)
var (
@@ -70,6 +70,10 @@ var (
// ErrInternal indicates an internal library error
ErrInternal = errors.New("internal libpod error")
+ // ErrPodPartialFail indicates that a pod operation was only partially
+ // successful, and some containers within the pod failed.
+ ErrPodPartialFail = errors.New("some containers failed")
+
// ErrDetach indicates that an attach session was manually detached by
// the user.
ErrDetach = utils.ErrDetach
diff --git a/libpod/define/version.go b/libpod/define/version.go
index 3eb016264..da8f88bc1 100644
--- a/libpod/define/version.go
+++ b/libpod/define/version.go
@@ -5,7 +5,7 @@ import (
"strconv"
"time"
- podmanVersion "github.com/containers/libpod/version"
+ podmanVersion "github.com/containers/libpod/v2/version"
)
// Overwritten at build time
diff --git a/libpod/diff.go b/libpod/diff.go
index baa4d6ad7..25d29866b 100644
--- a/libpod/diff.go
+++ b/libpod/diff.go
@@ -3,7 +3,7 @@ package libpod
import (
"io"
- "github.com/containers/libpod/libpod/layers"
+ "github.com/containers/libpod/v2/libpod/layers"
"github.com/containers/storage/pkg/archive"
"github.com/pkg/errors"
)
diff --git a/libpod/events.go b/libpod/events.go
index 3d07c5d76..7560940a5 100644
--- a/libpod/events.go
+++ b/libpod/events.go
@@ -1,9 +1,10 @@
package libpod
import (
+ "context"
"fmt"
- "github.com/containers/libpod/libpod/events"
+ "github.com/containers/libpod/v2/libpod/events"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -75,16 +76,16 @@ func (v *Volume) newVolumeEvent(status events.Status) {
// Events is a wrapper function for everyone to begin tailing the events log
// with options
-func (r *Runtime) Events(options events.ReadOptions) error {
+func (r *Runtime) Events(ctx context.Context, options events.ReadOptions) error {
eventer, err := r.newEventer()
if err != nil {
return err
}
- return eventer.Read(options)
+ return eventer.Read(ctx, options)
}
// GetEvents reads the event log and returns events based on input filters
-func (r *Runtime) GetEvents(filters []string) ([]*events.Event, error) {
+func (r *Runtime) GetEvents(ctx context.Context, filters []string) ([]*events.Event, error) {
var readErr error
eventChannel := make(chan *events.Event)
options := events.ReadOptions{
@@ -98,7 +99,7 @@ func (r *Runtime) GetEvents(filters []string) ([]*events.Event, error) {
return nil, err
}
go func() {
- readErr = eventer.Read(options)
+ readErr = eventer.Read(ctx, options)
}()
if readErr != nil {
return nil, readErr
@@ -112,7 +113,7 @@ func (r *Runtime) GetEvents(filters []string) ([]*events.Event, error) {
// GetLastContainerEvent takes a container name or ID and an event status and returns
// the last occurrence of the container event
-func (r *Runtime) GetLastContainerEvent(nameOrID string, containerEvent events.Status) (*events.Event, error) {
+func (r *Runtime) GetLastContainerEvent(ctx context.Context, nameOrID string, containerEvent events.Status) (*events.Event, error) {
// check to make sure the event.Status is valid
if _, err := events.StringToStatus(containerEvent.String()); err != nil {
return nil, err
@@ -122,7 +123,7 @@ func (r *Runtime) GetLastContainerEvent(nameOrID string, containerEvent events.S
fmt.Sprintf("event=%s", containerEvent),
"type=container",
}
- containerEvents, err := r.GetEvents(filters)
+ containerEvents, err := r.GetEvents(ctx, filters)
if err != nil {
return nil, err
}
diff --git a/libpod/events/config.go b/libpod/events/config.go
index 8fe551c5d..c34408e63 100644
--- a/libpod/events/config.go
+++ b/libpod/events/config.go
@@ -1,6 +1,7 @@
package events
import (
+ "context"
"time"
"github.com/pkg/errors"
@@ -52,7 +53,7 @@ type Eventer interface {
// Write an event to a backend
Write(event Event) error
// Read an event from the backend
- Read(options ReadOptions) error
+ Read(ctx context.Context, options ReadOptions) error
// String returns the type of event logger
String() string
}
diff --git a/libpod/events/filters.go b/libpod/events/filters.go
index 6eed1f61d..99feab79c 100644
--- a/libpod/events/filters.go
+++ b/libpod/events/filters.go
@@ -4,7 +4,7 @@ import (
"strings"
"time"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/pkg/errors"
)
diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go
index 482435038..d341ca7b5 100644
--- a/libpod/events/journal_linux.go
+++ b/libpod/events/journal_linux.go
@@ -3,6 +3,7 @@
package events
import (
+ "context"
"fmt"
"strconv"
"time"
@@ -53,7 +54,7 @@ func (e EventJournalD) Write(ee Event) error {
}
// Read reads events from the journal and sends qualified events to the event channel
-func (e EventJournalD) Read(options ReadOptions) error {
+func (e EventJournalD) Read(ctx context.Context, options ReadOptions) error {
defer close(options.EventChannel)
eventOptions, err := generateEventOptions(options.Filters, options.Since, options.Until)
if err != nil {
diff --git a/libpod/events/logfile.go b/libpod/events/logfile.go
index 93e6fa3c9..28d0dc07e 100644
--- a/libpod/events/logfile.go
+++ b/libpod/events/logfile.go
@@ -1,6 +1,7 @@
package events
import (
+ "context"
"fmt"
"os"
@@ -40,7 +41,7 @@ func (e EventLogFile) Write(ee Event) error {
}
// Reads from the log file
-func (e EventLogFile) Read(options ReadOptions) error {
+func (e EventLogFile) Read(ctx context.Context, options ReadOptions) error {
defer close(options.EventChannel)
eventOptions, err := generateEventOptions(options.Filters, options.Since, options.Until)
if err != nil {
@@ -50,6 +51,17 @@ func (e EventLogFile) Read(options ReadOptions) error {
if err != nil {
return err
}
+ funcDone := make(chan bool)
+ copy := true
+ go func() {
+ select {
+ case <-funcDone:
+ // Do nothing
+ case <-ctx.Done():
+ copy = false
+ t.Kill(errors.New("hangup by client"))
+ }
+ }()
for line := range t.Lines {
event, err := newEventFromJSONString(line.Text)
if err != nil {
@@ -65,10 +77,11 @@ func (e EventLogFile) Read(options ReadOptions) error {
for _, filter := range eventOptions {
include = include && filter(event)
}
- if include {
+ if include && copy {
options.EventChannel <- event
}
}
+ funcDone <- true
return nil
}
diff --git a/libpod/events/nullout.go b/libpod/events/nullout.go
index f3b36e609..3eca9e8db 100644
--- a/libpod/events/nullout.go
+++ b/libpod/events/nullout.go
@@ -1,5 +1,9 @@
package events
+import (
+ "context"
+)
+
// EventToNull is an eventer type that only performs write operations
// and only writes to /dev/null. It is meant for unittests only
type EventToNull struct{}
@@ -10,7 +14,7 @@ func (e EventToNull) Write(ee Event) error {
}
// Read does nothing. Do not use it.
-func (e EventToNull) Read(options ReadOptions) error {
+func (e EventToNull) Read(ctx context.Context, options ReadOptions) error {
return nil
}
diff --git a/libpod/filters/containers.go b/libpod/filters/containers.go
index c13372f91..b13adb4f5 100644
--- a/libpod/filters/containers.go
+++ b/libpod/filters/containers.go
@@ -6,10 +6,10 @@ import (
"strings"
"time"
- "github.com/containers/libpod/libpod"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/timetype"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/timetype"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/pkg/errors"
)
diff --git a/libpod/filters/pods.go b/libpod/filters/pods.go
index 0edb9fbf2..5fd67dc77 100644
--- a/libpod/filters/pods.go
+++ b/libpod/filters/pods.go
@@ -4,9 +4,9 @@ import (
"strconv"
"strings"
- "github.com/containers/libpod/libpod"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/pkg/errors"
)
diff --git a/libpod/healthcheck.go b/libpod/healthcheck.go
index 0006b7c06..b04742974 100644
--- a/libpod/healthcheck.go
+++ b/libpod/healthcheck.go
@@ -9,7 +9,7 @@ import (
"strings"
"time"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/healthcheck_linux.go b/libpod/healthcheck_linux.go
index 42dba6610..a671414c2 100644
--- a/libpod/healthcheck_linux.go
+++ b/libpod/healthcheck_linux.go
@@ -6,8 +6,8 @@ import (
"os/exec"
"strings"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/systemd"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/systemd"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/healthcheck_unsupported.go b/libpod/healthcheck_unsupported.go
index 1eccc77ba..28b1bc7da 100644
--- a/libpod/healthcheck_unsupported.go
+++ b/libpod/healthcheck_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/libpod/libpod/define"
+import "github.com/containers/libpod/v2/libpod/define"
// createTimer systemd timers for healthchecks of a container
func (c *Container) createTimer() error {
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go
index 081e7ef4f..a43a94896 100644
--- a/libpod/image/docker_registry_options.go
+++ b/libpod/image/docker_registry_options.go
@@ -6,7 +6,7 @@ import (
"github.com/containers/buildah/pkg/parse"
"github.com/containers/image/v5/docker/reference"
"github.com/containers/image/v5/types"
- podmanVersion "github.com/containers/libpod/version"
+ podmanVersion "github.com/containers/libpod/v2/version"
)
// DockerRegistryOptions encapsulates settings that affect how we connect or
diff --git a/libpod/image/filters.go b/libpod/image/filters.go
index 9d99fb344..11d081ec3 100644
--- a/libpod/image/filters.go
+++ b/libpod/image/filters.go
@@ -8,7 +8,7 @@ import (
"strings"
"time"
- "github.com/containers/libpod/pkg/inspect"
+ "github.com/containers/libpod/v2/pkg/inspect"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 83e7467e9..048ec825d 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -26,11 +26,11 @@ import (
"github.com/containers/image/v5/transports"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/image/v5/types"
- "github.com/containers/libpod/libpod/driver"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/inspect"
- "github.com/containers/libpod/pkg/registries"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/driver"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/inspect"
+ "github.com/containers/libpod/v2/pkg/registries"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/containers/storage"
digest "github.com/opencontainers/go-digest"
imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1"
diff --git a/libpod/image/image_test.go b/libpod/image/image_test.go
index 74067853e..645f8d3f3 100644
--- a/libpod/image/image_test.go
+++ b/libpod/image/image_test.go
@@ -7,8 +7,8 @@ import (
"os"
"testing"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/containers/storage"
"github.com/containers/storage/pkg/reexec"
"github.com/opencontainers/go-digest"
diff --git a/libpod/image/prune.go b/libpod/image/prune.go
index 518795173..5ad7a9a5e 100644
--- a/libpod/image/prune.go
+++ b/libpod/image/prune.go
@@ -5,8 +5,8 @@ import (
"strings"
"time"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/timetype"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/timetype"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/image/pull.go b/libpod/image/pull.go
index 24909a59a..f0cde2012 100644
--- a/libpod/image/pull.go
+++ b/libpod/image/pull.go
@@ -18,8 +18,8 @@ import (
"github.com/containers/image/v5/transports"
"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/image/v5/types"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/registries"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/registries"
"github.com/hashicorp/go-multierror"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
diff --git a/libpod/image/search.go b/libpod/image/search.go
index 72dba668f..ee1ff0312 100644
--- a/libpod/image/search.go
+++ b/libpod/image/search.go
@@ -8,7 +8,7 @@ import (
"github.com/containers/image/v5/docker"
"github.com/containers/image/v5/types"
- sysreg "github.com/containers/libpod/pkg/registries"
+ sysreg "github.com/containers/libpod/v2/pkg/registries"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/sync/semaphore"
diff --git a/libpod/in_memory_state.go b/libpod/in_memory_state.go
index 2f802f333..794212bf0 100644
--- a/libpod/in_memory_state.go
+++ b/libpod/in_memory_state.go
@@ -3,8 +3,8 @@ package libpod
import (
"strings"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/registrar"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/registrar"
"github.com/containers/storage/pkg/truncindex"
"github.com/pkg/errors"
)
diff --git a/libpod/info.go b/libpod/info.go
index 51208a2b1..68811b199 100644
--- a/libpod/info.go
+++ b/libpod/info.go
@@ -13,11 +13,11 @@ import (
"time"
"github.com/containers/buildah"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/linkmode"
- "github.com/containers/libpod/pkg/cgroups"
- registries2 "github.com/containers/libpod/pkg/registries"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/linkmode"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ registries2 "github.com/containers/libpod/v2/pkg/registries"
+ "github.com/containers/libpod/v2/pkg/rootless"
"github.com/containers/storage"
"github.com/containers/storage/pkg/system"
"github.com/pkg/errors"
diff --git a/libpod/kube.go b/libpod/kube.go
index 90acd2541..641faf4da 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -7,9 +7,9 @@ import (
"strings"
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/lookup"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/lookup"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
diff --git a/libpod/lock/file_lock_manager.go b/libpod/lock/file_lock_manager.go
index 8a4d939d3..adcc42d4e 100644
--- a/libpod/lock/file_lock_manager.go
+++ b/libpod/lock/file_lock_manager.go
@@ -1,7 +1,7 @@
package lock
import (
- "github.com/containers/libpod/libpod/lock/file"
+ "github.com/containers/libpod/v2/libpod/lock/file"
)
// FileLockManager manages shared memory locks.
diff --git a/libpod/lock/shm_lock_manager_linux.go b/libpod/lock/shm_lock_manager_linux.go
index 5f31939f8..38972effd 100644
--- a/libpod/lock/shm_lock_manager_linux.go
+++ b/libpod/lock/shm_lock_manager_linux.go
@@ -5,7 +5,7 @@ package lock
import (
"syscall"
- "github.com/containers/libpod/libpod/lock/shm"
+ "github.com/containers/libpod/v2/libpod/lock/shm"
"github.com/pkg/errors"
)
diff --git a/libpod/logs/log.go b/libpod/logs/log.go
index 6ad2a305f..03acadb18 100644
--- a/libpod/logs/log.go
+++ b/libpod/logs/log.go
@@ -8,7 +8,7 @@ import (
"sync"
"time"
- "github.com/containers/libpod/libpod/logs/reversereader"
+ "github.com/containers/libpod/v2/libpod/logs/reversereader"
"github.com/hpcloud/tail"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index f53573645..7985e17e1 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -18,11 +18,11 @@ import (
cnitypes "github.com/containernetworking/cni/pkg/types/current"
"github.com/containernetworking/plugins/pkg/ns"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/errorhandling"
- "github.com/containers/libpod/pkg/netns"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/rootlessport"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/errorhandling"
+ "github.com/containers/libpod/v2/pkg/netns"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/rootlessport"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/networking_unsupported.go b/libpod/networking_unsupported.go
index 1ef8fe2dc..d5189709c 100644
--- a/libpod/networking_unsupported.go
+++ b/libpod/networking_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/libpod/libpod/define"
+import "github.com/containers/libpod/v2/libpod/define"
func (r *Runtime) setupRootlessNetNS(ctr *Container) (err error) {
return define.ErrNotImplemented
diff --git a/libpod/oci.go b/libpod/oci.go
index c2f0041b1..c3bf74bba 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -4,7 +4,7 @@ import (
"bufio"
"net"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"k8s.io/client-go/tools/remotecommand"
)
diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go
index ff158c2d1..cfcb3f208 100644
--- a/libpod/oci_attach_linux.go
+++ b/libpod/oci_attach_linux.go
@@ -10,10 +10,10 @@ import (
"path/filepath"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/errorhandling"
- "github.com/containers/libpod/pkg/kubeutils"
- "github.com/containers/libpod/utils"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/errorhandling"
+ "github.com/containers/libpod/v2/pkg/kubeutils"
+ "github.com/containers/libpod/v2/utils"
"github.com/docker/docker/pkg/term"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/oci_attach_unsupported.go b/libpod/oci_attach_unsupported.go
index 3b0216e5d..6d753296c 100644
--- a/libpod/oci_attach_unsupported.go
+++ b/libpod/oci_attach_unsupported.go
@@ -5,7 +5,7 @@ package libpod
import (
"os"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"k8s.io/client-go/tools/remotecommand"
)
diff --git a/libpod/oci_conmon_exec_linux.go b/libpod/oci_conmon_exec_linux.go
index 6be8534d9..1a6fe827b 100644
--- a/libpod/oci_conmon_exec_linux.go
+++ b/libpod/oci_conmon_exec_linux.go
@@ -11,10 +11,10 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/errorhandling"
- "github.com/containers/libpod/pkg/util"
- "github.com/containers/libpod/utils"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/errorhandling"
+ "github.com/containers/libpod/v2/pkg/util"
+ "github.com/containers/libpod/v2/utils"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 26e5d70b0..98e436e78 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -21,13 +21,13 @@ import (
"github.com/containers/common/pkg/config"
conmonConfig "github.com/containers/conmon/runner/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/cgroups"
- "github.com/containers/libpod/pkg/errorhandling"
- "github.com/containers/libpod/pkg/lookup"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/util"
- "github.com/containers/libpod/utils"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ "github.com/containers/libpod/v2/pkg/errorhandling"
+ "github.com/containers/libpod/v2/pkg/lookup"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/util"
+ "github.com/containers/libpod/v2/utils"
pmount "github.com/containers/storage/pkg/mount"
"github.com/coreos/go-systemd/v22/activation"
spec "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/libpod/oci_conmon_unsupported.go b/libpod/oci_conmon_unsupported.go
index 309e0d417..cd6f0b92c 100644
--- a/libpod/oci_conmon_unsupported.go
+++ b/libpod/oci_conmon_unsupported.go
@@ -5,7 +5,7 @@ package libpod
import (
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
)
const (
diff --git a/libpod/oci_missing.go b/libpod/oci_missing.go
index 8caf00e6e..1b71bb154 100644
--- a/libpod/oci_missing.go
+++ b/libpod/oci_missing.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"sync"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"k8s.io/client-go/tools/remotecommand"
diff --git a/libpod/oci_util.go b/libpod/oci_util.go
index 8b40dad81..c9165d04b 100644
--- a/libpod/oci_util.go
+++ b/libpod/oci_util.go
@@ -8,7 +8,7 @@ import (
"strings"
"time"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/options.go b/libpod/options.go
index 4041fb1cf..c1a8fdbe1 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -9,11 +9,11 @@ import (
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/types"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/namespaces"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/namespaces"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
"github.com/cri-o/ocicni/pkg/ocicni"
@@ -1525,6 +1525,30 @@ func withSetAnon() VolumeCreateOption {
}
}
+// WithTimezone sets the timezone in the container
+func WithTimezone(path string) CtrCreateOption {
+ return func(ctr *Container) error {
+ if ctr.valid {
+ return define.ErrCtrFinalized
+ }
+ if path != "local" {
+ zone := filepath.Join("/usr/share/zoneinfo", path)
+
+ file, err := os.Stat(zone)
+ if err != nil {
+ return err
+ }
+ //We don't want to mount a timezone directory
+ if file.IsDir() {
+ return errors.New("Invalid timezone: is a directory")
+ }
+ }
+
+ ctr.config.Timezone = path
+ return nil
+ }
+}
+
// Pod Creation Options
// WithPodName sets the name of the pod.
diff --git a/libpod/pod.go b/libpod/pod.go
index bf0d7a397..00ba5d53c 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -4,8 +4,8 @@ import (
"net"
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/lock"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/lock"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/pkg/errors"
)
diff --git a/libpod/pod_api.go b/libpod/pod_api.go
index 98f4cad73..a02b171e1 100644
--- a/libpod/pod_api.go
+++ b/libpod/pod_api.go
@@ -3,10 +3,10 @@ package libpod
import (
"context"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/cgroups"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ "github.com/containers/libpod/v2/pkg/rootless"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -59,7 +59,7 @@ func (p *Pod) Start(ctx context.Context) (map[string]error, error) {
}
if len(ctrErrors) > 0 {
- return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error starting some containers")
+ return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error starting some containers")
}
defer p.newPodEvent(events.Start)
return nil, nil
@@ -139,7 +139,7 @@ func (p *Pod) StopWithTimeout(ctx context.Context, cleanup bool, timeout int) (m
}
if len(ctrErrors) > 0 {
- return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error stopping some containers")
+ return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error stopping some containers")
}
defer p.newPodEvent(events.Stop)
return nil, nil
@@ -208,7 +208,7 @@ func (p *Pod) Pause() (map[string]error, error) {
}
if len(ctrErrors) > 0 {
- return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error pausing some containers")
+ return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error pausing some containers")
}
defer p.newPodEvent(events.Pause)
return nil, nil
@@ -267,7 +267,7 @@ func (p *Pod) Unpause() (map[string]error, error) {
}
if len(ctrErrors) > 0 {
- return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error unpausing some containers")
+ return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error unpausing some containers")
}
defer p.newPodEvent(events.Unpause)
@@ -321,7 +321,7 @@ func (p *Pod) Restart(ctx context.Context) (map[string]error, error) {
}
if len(ctrErrors) > 0 {
- return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error stopping some containers")
+ return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error stopping some containers")
}
p.newPodEvent(events.Stop)
p.newPodEvent(events.Start)
@@ -387,7 +387,7 @@ func (p *Pod) Kill(signal uint) (map[string]error, error) {
}
if len(ctrErrors) > 0 {
- return ctrErrors, errors.Wrapf(define.ErrCtrExists, "error killing some containers")
+ return ctrErrors, errors.Wrapf(define.ErrPodPartialFail, "error killing some containers")
}
defer p.newPodEvent(events.Kill)
return nil, nil
diff --git a/libpod/pod_internal.go b/libpod/pod_internal.go
index 9e60d3c07..417cdfd86 100644
--- a/libpod/pod_internal.go
+++ b/libpod/pod_internal.go
@@ -6,7 +6,7 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/containers/storage/pkg/stringid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/pod_status.go b/libpod/pod_status.go
index 3a44c4457..d6bd5f211 100644
--- a/libpod/pod_status.go
+++ b/libpod/pod_status.go
@@ -1,6 +1,6 @@
package libpod
-import "github.com/containers/libpod/libpod/define"
+import "github.com/containers/libpod/v2/libpod/define"
// GetPodStatus determines the status of the pod based on the
// statuses of the containers in the pod.
diff --git a/libpod/pod_top_linux.go b/libpod/pod_top_linux.go
index 1f84c8667..f8f7ea015 100644
--- a/libpod/pod_top_linux.go
+++ b/libpod/pod_top_linux.go
@@ -6,8 +6,8 @@ import (
"strconv"
"strings"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/rootless"
"github.com/containers/psgo"
)
diff --git a/libpod/pod_top_unsupported.go b/libpod/pod_top_unsupported.go
index 9a3333275..fb24ae865 100644
--- a/libpod/pod_top_unsupported.go
+++ b/libpod/pod_top_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/libpod/libpod/define"
+import "github.com/containers/libpod/v2/libpod/define"
// GetPodPidInformation is exclusive to linux
func (p *Pod) GetPodPidInformation(descriptors []string) ([]string, error) {
diff --git a/libpod/reset.go b/libpod/reset.go
index c6754b7f6..2f18cebee 100644
--- a/libpod/reset.go
+++ b/libpod/reset.go
@@ -5,9 +5,9 @@ import (
"os"
"path/filepath"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/runtime.go b/libpod/runtime.go
index b1e48b3b3..2575decc3 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -12,13 +12,13 @@ import (
"github.com/containers/common/pkg/config"
is "github.com/containers/image/v5/storage"
"github.com/containers/image/v5/types"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/libpod/image"
- "github.com/containers/libpod/libpod/lock"
- "github.com/containers/libpod/pkg/cgroups"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/libpod/image"
+ "github.com/containers/libpod/v2/libpod/lock"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/containers/storage"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/docker/docker/pkg/namesgenerator"
diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go
index cfcf4589f..99b0406fb 100644
--- a/libpod/runtime_cstorage.go
+++ b/libpod/runtime_cstorage.go
@@ -3,7 +3,7 @@ package libpod
import (
"time"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 74647dab8..e184df45d 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -9,10 +9,10 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/cgroups"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ "github.com/containers/libpod/v2/pkg/rootless"
"github.com/containers/storage/pkg/stringid"
"github.com/docker/go-units"
spec "github.com/opencontainers/runtime-spec/specs-go"
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go
index cd7f54799..eab05f34d 100644
--- a/libpod/runtime_img.go
+++ b/libpod/runtime_img.go
@@ -11,9 +11,9 @@ import (
"github.com/containers/buildah/imagebuildah"
"github.com/containers/image/v5/docker/reference"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/image"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/image"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/runtime_img_test.go b/libpod/runtime_img_test.go
index 2bccb2752..a8cc2c941 100644
--- a/libpod/runtime_img_test.go
+++ b/libpod/runtime_img_test.go
@@ -6,7 +6,7 @@ import (
"reflect"
"testing"
- sysreg "github.com/containers/libpod/pkg/registries"
+ sysreg "github.com/containers/libpod/v2/pkg/registries"
"github.com/stretchr/testify/assert"
)
diff --git a/libpod/runtime_migrate.go b/libpod/runtime_migrate.go
index d85652232..b70ca982d 100644
--- a/libpod/runtime_migrate.go
+++ b/libpod/runtime_migrate.go
@@ -11,9 +11,9 @@ import (
"strconv"
"syscall"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go
index 5b81e166a..ace15a878 100644
--- a/libpod/runtime_pod.go
+++ b/libpod/runtime_pod.go
@@ -4,8 +4,8 @@ import (
"context"
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/util"
"github.com/pkg/errors"
)
diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go
index a0dee3aa1..24802f89e 100644
--- a/libpod/runtime_pod_infra_linux.go
+++ b/libpod/runtime_pod_infra_linux.go
@@ -6,10 +6,10 @@ import (
"context"
"strings"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/image"
- "github.com/containers/libpod/pkg/rootless"
- "github.com/containers/libpod/pkg/util"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/image"
+ "github.com/containers/libpod/v2/pkg/rootless"
+ "github.com/containers/libpod/v2/pkg/util"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go
index 25584c5ad..4306140bb 100644
--- a/libpod/runtime_pod_linux.go
+++ b/libpod/runtime_pod_linux.go
@@ -10,10 +10,10 @@ import (
"strings"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/pkg/cgroups"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ "github.com/containers/libpod/v2/pkg/rootless"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/runtime_pod_unsupported.go b/libpod/runtime_pod_unsupported.go
index 5f0811822..6161dd4eb 100644
--- a/libpod/runtime_pod_unsupported.go
+++ b/libpod/runtime_pod_unsupported.go
@@ -5,7 +5,7 @@ package libpod
import (
"context"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
)
// NewPod makes a new, empty pod
diff --git a/libpod/runtime_renumber.go b/libpod/runtime_renumber.go
index 9de2556b2..f63d35c22 100644
--- a/libpod/runtime_renumber.go
+++ b/libpod/runtime_renumber.go
@@ -1,7 +1,7 @@
package libpod
import (
- "github.com/containers/libpod/libpod/events"
+ "github.com/containers/libpod/v2/libpod/events"
"github.com/pkg/errors"
)
diff --git a/libpod/runtime_volume.go b/libpod/runtime_volume.go
index d5fede1d1..4c57da09b 100644
--- a/libpod/runtime_volume.go
+++ b/libpod/runtime_volume.go
@@ -3,8 +3,8 @@ package libpod
import (
"context"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
"github.com/pkg/errors"
)
diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go
index f6ecae4ab..84649ef36 100644
--- a/libpod/runtime_volume_linux.go
+++ b/libpod/runtime_volume_linux.go
@@ -9,8 +9,8 @@ import (
"strings"
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/events"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/events"
"github.com/containers/storage/pkg/stringid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/runtime_volume_unsupported.go b/libpod/runtime_volume_unsupported.go
index 1cbf2699a..b339819e5 100644
--- a/libpod/runtime_volume_unsupported.go
+++ b/libpod/runtime_volume_unsupported.go
@@ -5,7 +5,7 @@ package libpod
import (
"context"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
)
func (r *Runtime) removeVolume(ctx context.Context, v *Volume, force bool) error {
diff --git a/libpod/state_test.go b/libpod/state_test.go
index db1c8dd99..30ddf5e24 100644
--- a/libpod/state_test.go
+++ b/libpod/state_test.go
@@ -9,8 +9,8 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/lock"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/lock"
"github.com/containers/storage"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
diff --git a/libpod/stats.go b/libpod/stats.go
index 9f4986144..b3dffbdb7 100644
--- a/libpod/stats.go
+++ b/libpod/stats.go
@@ -7,8 +7,8 @@ import (
"syscall"
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/cgroups"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/cgroups"
"github.com/pkg/errors"
)
diff --git a/libpod/stats_unsupported.go b/libpod/stats_unsupported.go
index 6d21ae8f2..940be156c 100644
--- a/libpod/stats_unsupported.go
+++ b/libpod/stats_unsupported.go
@@ -2,7 +2,7 @@
package libpod
-import "github.com/containers/libpod/libpod/define"
+import "github.com/containers/libpod/v2/libpod/define"
// GetContainerStats gets the running stats for a given container
func (c *Container) GetContainerStats(previousStats *define.ContainerStats) (*define.ContainerStats, error) {
diff --git a/libpod/storage.go b/libpod/storage.go
index c90020833..be79b3fc0 100644
--- a/libpod/storage.go
+++ b/libpod/storage.go
@@ -6,7 +6,7 @@ import (
istorage "github.com/containers/image/v5/storage"
"github.com/containers/image/v5/types"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
diff --git a/libpod/util.go b/libpod/util.go
index ba9f1fa05..7504295f0 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -13,8 +13,8 @@ import (
"time"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/utils"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/utils"
"github.com/fsnotify/fsnotify"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
diff --git a/libpod/util_linux.go b/libpod/util_linux.go
index f0b4028de..aac206f53 100644
--- a/libpod/util_linux.go
+++ b/libpod/util_linux.go
@@ -7,9 +7,9 @@ import (
"strings"
"syscall"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/cgroups"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/cgroups"
+ "github.com/containers/libpod/v2/pkg/rootless"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
diff --git a/libpod/util_test.go b/libpod/util_test.go
index 4e18a7e4e..313854f5a 100644
--- a/libpod/util_test.go
+++ b/libpod/util_test.go
@@ -3,7 +3,7 @@ package libpod
import (
"testing"
- "github.com/containers/libpod/utils"
+ "github.com/containers/libpod/v2/utils"
"github.com/stretchr/testify/assert"
)
diff --git a/libpod/util_unsupported.go b/libpod/util_unsupported.go
index 4c5616bd0..36b70c4c9 100644
--- a/libpod/util_unsupported.go
+++ b/libpod/util_unsupported.go
@@ -3,7 +3,7 @@
package libpod
import (
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/pkg/errors"
)
diff --git a/libpod/volume.go b/libpod/volume.go
index 58d1f81a6..03299e9d3 100644
--- a/libpod/volume.go
+++ b/libpod/volume.go
@@ -3,8 +3,8 @@ package libpod
import (
"time"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/libpod/lock"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/libpod/lock"
)
// Volume is a libpod named volume.
diff --git a/libpod/volume_inspect.go b/libpod/volume_inspect.go
index 2be0aeaec..85848f84f 100644
--- a/libpod/volume_inspect.go
+++ b/libpod/volume_inspect.go
@@ -3,7 +3,7 @@ package libpod
import (
"time"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
)
// InspectVolumeData is the output of Inspect() on a volume. It is matched to
diff --git a/libpod/volume_internal.go b/libpod/volume_internal.go
index d7d5a2494..1aa548521 100644
--- a/libpod/volume_internal.go
+++ b/libpod/volume_internal.go
@@ -4,7 +4,7 @@ import (
"os"
"path/filepath"
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
"github.com/pkg/errors"
)
diff --git a/libpod/volume_internal_linux.go b/libpod/volume_internal_linux.go
index 081a17325..75333d0b4 100644
--- a/libpod/volume_internal_linux.go
+++ b/libpod/volume_internal_linux.go
@@ -6,8 +6,8 @@ import (
"os/exec"
"strings"
- "github.com/containers/libpod/libpod/define"
- "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/v2/libpod/define"
+ "github.com/containers/libpod/v2/pkg/rootless"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
diff --git a/libpod/volume_internal_unsupported.go b/libpod/volume_internal_unsupported.go
index 74e24cfda..40b199c75 100644
--- a/libpod/volume_internal_unsupported.go
+++ b/libpod/volume_internal_unsupported.go
@@ -3,7 +3,7 @@
package libpod
import (
- "github.com/containers/libpod/libpod/define"
+ "github.com/containers/libpod/v2/libpod/define"
)
func (v *Volume) mount() error {