summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/machine/list.go9
-rw-r--r--cmd/podman/system/version.go2
-rw-r--r--docs/source/markdown/podman-create.1.md10
-rw-r--r--docs/source/markdown/podman-machine-init.1.md4
-rw-r--r--docs/source/markdown/podman-machine-ssh.1.md2
-rw-r--r--docs/source/markdown/podman-pause.1.md2
-rw-r--r--docs/source/markdown/podman-run.1.md10
-rw-r--r--go.mod4
-rw-r--r--go.sum8
-rw-r--r--libpod/container_internal_linux.go1
-rw-r--r--libpod/container_path_resolution.go2
-rw-r--r--pkg/api/handlers/libpod/volumes.go17
-rw-r--r--pkg/domain/entities/volumes.go4
-rw-r--r--pkg/machine/config.go1
-rw-r--r--pkg/machine/qemu/config.go2
-rw-r--r--pkg/machine/qemu/machine.go3
-rw-r--r--pkg/specgen/generate/storage.go3
-rw-r--r--pkg/specgenutil/volumes.go12
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_volume.py67
-rw-r--r--test/e2e/run_test.go8
-rw-r--r--test/e2e/version_test.go10
-rw-r--r--test/system/070-build.bats9
-rw-r--r--vendor/modules.txt4
23 files changed, 168 insertions, 26 deletions
diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go
index 7e5459e08..d569f4db0 100644
--- a/cmd/podman/machine/list.go
+++ b/cmd/podman/machine/list.go
@@ -48,6 +48,7 @@ type machineReporter struct {
Created string
Running bool
LastUp string
+ Stream string
VMType string
CPUs uint64
Memory string
@@ -153,6 +154,13 @@ func strUint(u uint64) string {
return strconv.FormatUint(u, 10)
}
+func streamName(imageStream string) string {
+ if imageStream == "" {
+ return "default"
+ }
+ return imageStream
+}
+
func toMachineFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
cfg, err := config.ReadCustomConfig()
if err != nil {
@@ -167,6 +175,7 @@ func toMachineFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
response.Running = vm.Running
response.LastUp = strTime(vm.LastUp)
response.Created = strTime(vm.CreatedAt)
+ response.Stream = streamName(vm.Stream)
response.VMType = vm.VMType
response.CPUs = vm.CPUs
response.Memory = strUint(vm.Memory * units.MiB)
diff --git a/cmd/podman/system/version.go b/cmd/podman/system/version.go
index 3ddd19bae..3443978d6 100644
--- a/cmd/podman/system/version.go
+++ b/cmd/podman/system/version.go
@@ -20,7 +20,7 @@ var (
versionCommand = &cobra.Command{
Use: "version [options]",
Args: validate.NoArgs,
- Short: "Display the Podman Version Information",
+ Short: "Display the Podman version information",
RunE: version,
ValidArgsFunction: completion.AutocompleteNone,
}
diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md
index ea9042861..3ff736adb 100644
--- a/docs/source/markdown/podman-create.1.md
+++ b/docs/source/markdown/podman-create.1.md
@@ -638,6 +638,16 @@ Current supported mount TYPEs are **bind**, **volume**, **image**, **tmpfs** and
. U, chown: true or false (default). Change recursively the owner and group of the source volume based on the UID and GID of the container.
+ Options specific to devpts:
+
+ · uid: UID of the file owner (default 0).
+
+ · gid: GID of the file owner (default 0).
+
+ · mode: permission mask for the file (default 600).
+
+ · max: maximum number of PTYs (default 1048576).
+
#### **--name**=*name*
Assign a name to the container
diff --git a/docs/source/markdown/podman-machine-init.1.md b/docs/source/markdown/podman-machine-init.1.md
index f1fbd56ee..45f798cd6 100644
--- a/docs/source/markdown/podman-machine-init.1.md
+++ b/docs/source/markdown/podman-machine-init.1.md
@@ -18,6 +18,10 @@ tied to the Linux kernel.
SSH keys are automatically generated to access the VM, and system connections to the root account
and a user account inside the VM are added.
+By default, the VM distribution is [Fedora CoreOS](https://getfedora.org/en/coreos?stream=testing).
+Fedora CoreOS upgrades come out every 14 days and are detected and installed automatically. The VM will be rebooted during the upgrade.
+For more information on updates and advanced configuration, please see the FCOS update docs [here](https://docs.fedoraproject.org/en-US/fedora-coreos/auto-updates/) and [here](https://coreos.github.io/zincati/usage/updates-strategy/).
+
## OPTIONS
#### **--cpus**=*number*
diff --git a/docs/source/markdown/podman-machine-ssh.1.md b/docs/source/markdown/podman-machine-ssh.1.md
index c4c732819..dd592622f 100644
--- a/docs/source/markdown/podman-machine-ssh.1.md
+++ b/docs/source/markdown/podman-machine-ssh.1.md
@@ -9,7 +9,7 @@ podman\-machine\-ssh - SSH into a virtual machine
## DESCRIPTION
SSH into a Podman-managed virtual machine and optionally execute a command
-on the virtual machine. Unless using the default virtual machine, the
+on the virtual machine. Unless using the default virtual machine, the
first argument must be the virtual machine name. The optional command to
execute can then follow. If no command is provided, an interactive session
with the virtual machine is established.
diff --git a/docs/source/markdown/podman-pause.1.md b/docs/source/markdown/podman-pause.1.md
index 123362822..90ea1e32e 100644
--- a/docs/source/markdown/podman-pause.1.md
+++ b/docs/source/markdown/podman-pause.1.md
@@ -31,7 +31,7 @@ podman pause 860a4b23
Pause all **running** containers.
```
-podman stop -a
+podman pause -a
```
## SEE ALSO
diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md
index b5f3130fe..a1170253f 100644
--- a/docs/source/markdown/podman-run.1.md
+++ b/docs/source/markdown/podman-run.1.md
@@ -665,6 +665,16 @@ Current supported mount TYPEs are **bind**, **volume**, **image**, **tmpfs** and
. U, chown: true or false (default). Change recursively the owner and group of the source volume based on the UID and GID of the container.
+ Options specific to devpts:
+
+ · uid: UID of the file owner (default 0).
+
+ · gid: GID of the file owner (default 0).
+
+ · mode: permission mask for the file (default 600).
+
+ · max: maximum number of PTYs (default 1048576).
+
#### **--name**=*name*
Assign a name to the container.
diff --git a/go.mod b/go.mod
index 90f441a0a..9212a83e0 100644
--- a/go.mod
+++ b/go.mod
@@ -68,6 +68,6 @@ require (
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
- k8s.io/api v0.22.2
- k8s.io/apimachinery v0.22.2
+ k8s.io/api v0.22.3
+ k8s.io/apimachinery v0.22.3
)
diff --git a/go.sum b/go.sum
index 2ec5d649f..8a18541d7 100644
--- a/go.sum
+++ b/go.sum
@@ -1505,13 +1505,13 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo=
k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ=
k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=
-k8s.io/api v0.22.2 h1:M8ZzAD0V6725Fjg53fKeTJxGsJvRbk4TEm/fexHMtfw=
-k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8=
+k8s.io/api v0.22.3 h1:wOoES2GoSkUsdped2RB4zYypPqWtvprGoKCENTOOjP4=
+k8s.io/api v0.22.3/go.mod h1:azgiXFiXqiWyLCfI62/eYBOu19rj2LKmIhFPP4+33fs=
k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc=
-k8s.io/apimachinery v0.22.2 h1:ejz6y/zNma8clPVfNDLnPbleBo6MpoFy/HBiBqCouVk=
-k8s.io/apimachinery v0.22.2/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
+k8s.io/apimachinery v0.22.3 h1:mrvBG5CZnEfwgpVqWcrRKvdsYECTrhAR6cApAgdsflk=
+k8s.io/apimachinery v0.22.3/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM=
k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q=
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index d3151f7e0..2fd519990 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -1546,6 +1546,7 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti
logrus.Debugf("Restored container %s", c.ID())
c.state.State = define.ContainerStateRunning
+ c.state.Checkpointed = false
if !options.Keep {
// Delete all checkpoint related files. At this point, in theory, all files
diff --git a/libpod/container_path_resolution.go b/libpod/container_path_resolution.go
index bb2ef1a73..7db23b783 100644
--- a/libpod/container_path_resolution.go
+++ b/libpod/container_path_resolution.go
@@ -161,7 +161,7 @@ func isPathOnBindMount(c *Container, containerPath string) bool {
if cleanedContainerPath == filepath.Clean(m.Destination) {
return true
}
- for dest := m.Destination; dest != "/"; dest = filepath.Dir(dest) {
+ for dest := m.Destination; dest != "/" && dest != "."; dest = filepath.Dir(dest) {
if cleanedContainerPath == dest {
return true
}
diff --git a/pkg/api/handlers/libpod/volumes.go b/pkg/api/handlers/libpod/volumes.go
index 3ba39b860..ffdb30551 100644
--- a/pkg/api/handlers/libpod/volumes.go
+++ b/pkg/api/handlers/libpod/volumes.go
@@ -29,12 +29,13 @@ func CreateVolume(w http.ResponseWriter, r *http.Request) {
}{
// override any golang type defaults
}
- input := entities.VolumeCreateOptions{}
if err := decoder.Decode(&query, r.URL.Query()); err != nil {
utils.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError,
errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
return
}
+
+ input := entities.VolumeCreateOptions{}
// decode params from body
if err := json.NewDecoder(r.Body).Decode(&input); err != nil {
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Decode()"))
@@ -47,9 +48,19 @@ func CreateVolume(w http.ResponseWriter, r *http.Request) {
if len(input.Driver) > 0 {
volumeOptions = append(volumeOptions, libpod.WithVolumeDriver(input.Driver))
}
- if len(input.Label) > 0 {
- volumeOptions = append(volumeOptions, libpod.WithVolumeLabels(input.Label))
+
+ // Label provided for compatibility.
+ labels := make(map[string]string, len(input.Label)+len(input.Labels))
+ for k, v := range input.Label {
+ labels[k] = v
}
+ for k, v := range input.Labels {
+ labels[k] = v
+ }
+ if len(labels) > 0 {
+ volumeOptions = append(volumeOptions, libpod.WithVolumeLabels(labels))
+ }
+
if len(input.Options) > 0 {
parsedOptions, err := parse.VolumeOptions(input.Options)
if err != nil {
diff --git a/pkg/domain/entities/volumes.go b/pkg/domain/entities/volumes.go
index 2ecfb4446..9b2a170e2 100644
--- a/pkg/domain/entities/volumes.go
+++ b/pkg/domain/entities/volumes.go
@@ -78,8 +78,10 @@ type VolumeCreateOptions struct {
Name string `schema:"name"`
// Volume driver to use
Driver string `schema:"driver"`
- // User-defined key/value metadata.
+ // User-defined key/value metadata. Provided for compatibility
Label map[string]string `schema:"label"`
+ // User-defined key/value metadata. Preferred field, will override Label
+ Labels map[string]string `schema:"labels"`
// Mapping of driver options and values.
Options map[string]string `schema:"opts"`
}
diff --git a/pkg/machine/config.go b/pkg/machine/config.go
index 3ff5c7fe7..55d5dd7b4 100644
--- a/pkg/machine/config.go
+++ b/pkg/machine/config.go
@@ -57,6 +57,7 @@ type ListResponse struct {
CreatedAt time.Time
LastUp time.Time
Running bool
+ Stream string
VMType string
CPUs uint64
Memory uint64
diff --git a/pkg/machine/qemu/config.go b/pkg/machine/qemu/config.go
index 9f5f45b58..c04773450 100644
--- a/pkg/machine/qemu/config.go
+++ b/pkg/machine/qemu/config.go
@@ -13,6 +13,8 @@ type MachineVM struct {
IdentityPath string
// IgnitionFilePath is the fq path to the .ign file
IgnitionFilePath string
+ // ImageStream is the update stream for the image
+ ImageStream string
// ImagePath is the fq path to
ImagePath string
// Memory in megabytes assigned to the vm
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 727b3cda4..4d8242e39 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -143,6 +143,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) error {
switch opts.ImagePath {
case "testing", "next", "stable", "":
// Get image as usual
+ v.ImageStream = opts.ImagePath
dd, err := machine.NewFcosDownloader(vmtype, v.Name, opts.ImagePath)
if err != nil {
return err
@@ -154,6 +155,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) error {
default:
// The user has provided an alternate image which can be a file path
// or URL.
+ v.ImageStream = "custom"
g, err := machine.NewGenericDownloader(vmtype, v.Name, opts.ImagePath)
if err != nil {
return err
@@ -595,6 +597,7 @@ func GetVMInfos() ([]*machine.ListResponse, error) {
listEntry := new(machine.ListResponse)
listEntry.Name = vm.Name
+ listEntry.Stream = vm.ImageStream
listEntry.VMType = "qemu"
listEntry.CPUs = vm.CPUs
listEntry.Memory = vm.Memory
diff --git a/pkg/specgen/generate/storage.go b/pkg/specgen/generate/storage.go
index 3fde1a1b4..30248a886 100644
--- a/pkg/specgen/generate/storage.go
+++ b/pkg/specgen/generate/storage.go
@@ -214,9 +214,6 @@ func getImageVolumes(ctx context.Context, img *libimage.Image, s *specgen.SpecGe
}
for volume := range inspect.Config.Volumes {
logrus.Debugf("Image has volume at %q", volume)
- if err = parse.ValidateVolumeCtrDir(volume); err != nil {
- return nil, nil, err
- }
cleanDest := filepath.Clean(volume)
switch mode {
case "", "anonymous":
diff --git a/pkg/specgenutil/volumes.go b/pkg/specgenutil/volumes.go
index 3ce96164f..184bfadf8 100644
--- a/pkg/specgenutil/volumes.go
+++ b/pkg/specgenutil/volumes.go
@@ -360,7 +360,7 @@ func getBindMount(args []string) (spec.Mount, error) {
// Since Docker ignores this option so shall we.
continue
default:
- return newMount, errors.Wrapf(util.ErrBadMntOption, kv[0])
+ return newMount, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
}
}
@@ -460,7 +460,7 @@ func getTmpfsMount(args []string) (spec.Mount, error) {
// Since Docker ignores this option so shall we.
continue
default:
- return newMount, errors.Wrapf(util.ErrBadMntOption, kv[0])
+ return newMount, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
}
}
@@ -483,6 +483,8 @@ func getDevptsMount(args []string) (spec.Mount, error) {
for _, val := range args {
kv := strings.SplitN(val, "=", 2)
switch kv[0] {
+ case "uid", "gid", "mode", "ptxmode", "newinstance", "max":
+ newMount.Options = append(newMount.Options, val)
case "target", "dst", "destination":
if len(kv) == 1 {
return newMount, errors.Wrapf(optionArgError, kv[0])
@@ -493,7 +495,7 @@ func getDevptsMount(args []string) (spec.Mount, error) {
newMount.Destination = filepath.Clean(kv[1])
setDest = true
default:
- return newMount, errors.Wrapf(util.ErrBadMntOption, kv[0])
+ return newMount, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
}
}
@@ -573,7 +575,7 @@ func getNamedVolume(args []string) (*specgen.NamedVolume, error) {
// Since Docker ignores this option so shall we.
continue
default:
- return nil, errors.Wrapf(util.ErrBadMntOption, kv[0])
+ return nil, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
}
}
@@ -624,7 +626,7 @@ func getImageVolume(args []string) (*specgen.ImageVolume, error) {
// Since Docker ignores this option so shall we.
continue
default:
- return nil, errors.Wrapf(util.ErrBadMntOption, kv[0])
+ return nil, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
}
}
diff --git a/test/apiv2/python/rest_api/test_v2_0_0_volume.py b/test/apiv2/python/rest_api/test_v2_0_0_volume.py
index f5231e17c..2156318b0 100644
--- a/test/apiv2/python/rest_api/test_v2_0_0_volume.py
+++ b/test/apiv2/python/rest_api/test_v2_0_0_volume.py
@@ -7,7 +7,7 @@ from .fixtures import APITestCase
class VolumeTestCase(APITestCase):
- def test_volume(self):
+ def test_volume_crud(self):
name = f"Volume_{random.getrandbits(160):x}"
ls = requests.get(self.podman_url + "/v1.40/volumes")
@@ -70,6 +70,71 @@ class VolumeTestCase(APITestCase):
self.assertIn(name, payload["VolumesDeleted"])
self.assertGreater(payload["SpaceReclaimed"], 0)
+ def test_volume_label(self):
+ name = f"Volume_{random.getrandbits(160):x}"
+ expected = {
+ "Production": "False",
+ "Database": "Foxbase",
+ }
+
+ create = requests.post(
+ self.podman_url + "/v4.0.0/libpod/volumes/create",
+ json={"name": name, "label": expected},
+ )
+ self.assertEqual(create.status_code, 201, create.text)
+
+ inspect = requests.get(self.podman_url + f"/v4.0.0/libpod/volumes/{name}/json")
+ self.assertEqual(inspect.status_code, 200, inspect.text)
+
+ volume = inspect.json()
+ self.assertIn("Labels", volume)
+ self.assertNotIn("Label", volume)
+ self.assertDictEqual(expected, volume["Labels"])
+
+ def test_volume_labels(self):
+ name = f"Volume_{random.getrandbits(160):x}"
+ expected = {
+ "Production": "False",
+ "Database": "Foxbase",
+ }
+
+ create = requests.post(
+ self.podman_url + "/v4.0.0/libpod/volumes/create",
+ json={"name": name, "labels": expected},
+ )
+ self.assertEqual(create.status_code, 201, create.text)
+
+ inspect = requests.get(self.podman_url + f"/v4.0.0/libpod/volumes/{name}/json")
+ self.assertEqual(inspect.status_code, 200, inspect.text)
+
+ volume = inspect.json()
+ self.assertIn("Labels", volume)
+ self.assertDictEqual(expected, volume["Labels"])
+
+ def test_volume_label_override(self):
+ name = f"Volume_{random.getrandbits(160):x}"
+ create = requests.post(
+ self.podman_url + "/v4.0.0/libpod/volumes/create",
+ json={
+ "Name": name,
+ "Label": {
+ "Database": "dbase",
+ },
+ "Labels": {
+ "Database": "sqlserver",
+ },
+ },
+ )
+ self.assertEqual(create.status_code, 201, create.text)
+
+ inspect = requests.get(self.podman_url + f"/v4.0.0/libpod/volumes/{name}/json")
+ self.assertEqual(inspect.status_code, 200, inspect.text)
+
+ volume = inspect.json()
+ self.assertIn("Labels", volume)
+ self.assertNotIn("Label", volume)
+ self.assertDictEqual({"Database": "sqlserver"}, volume["Labels"])
+
if __name__ == "__main__":
unittest.main()
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 2e0f626d0..95660bfc9 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -1198,6 +1198,14 @@ USER mail`, BB)
Expect(session.OutputToString()).To(ContainSubstring("devpts"))
})
+ It("podman run --mount type=devpts,target=/dev/pts with uid, gid and mode", func() {
+ // runc doesn't seem to honor uid= so avoid testing it
+ session := podmanTest.Podman([]string{"run", "-t", "--mount", "type=devpts,target=/dev/pts,uid=1000,gid=1001,mode=123", fedoraMinimal, "stat", "-c%g-%a", "/dev/pts/0"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(session.OutputToString()).To(ContainSubstring("1001-123"))
+ })
+
It("podman run --pod automatically", func() {
session := podmanTest.Podman([]string{"run", "-d", "--pod", "new:foobar", ALPINE, "nc", "-l", "-p", "8686"})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go
index 75986e671..9398248b8 100644
--- a/test/e2e/version_test.go
+++ b/test/e2e/version_test.go
@@ -31,7 +31,6 @@ var _ = Describe("Podman version", func() {
f := CurrentGinkgoTestDescription()
processTestResult(f)
podmanTest.SeedImages()
-
})
It("podman version", func() {
@@ -96,4 +95,13 @@ var _ = Describe("Podman version", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
})
+
+ It("podman help", func() {
+ session := podmanTest.Podman([]string{"help"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(session.Out.Contents()).Should(
+ ContainSubstring("Display the Podman version information"),
+ )
+ })
})
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index d3dc14d81..1d24eef15 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -39,6 +39,7 @@ EOF
cat >$dockerfile <<EOF
FROM $IMAGE
RUN echo $rand_content > /$rand_filename
+VOLUME ['/etc/foo', '/etc/bar']
EOF
run_podman buildx build --load -t build_test --format=docker $tmpdir
@@ -47,6 +48,14 @@ EOF
run_podman run --rm build_test cat /$rand_filename
is "$output" "$rand_content" "reading generated file in image"
+ # Make sure the volumes are created at surprising yet Docker-compatible
+ # destinations (see bugzilla.redhat.com/show_bug.cgi?id=2014149).
+ run_podman run --rm build_test find /[ /etc/bar\] -print
+ is "$output" "/\[
+/\[/etc
+/\[/etc/foo,
+/etc/bar]" "weird VOLUME gets converted to directories with brackets and comma"
+
run_podman rmi -f build_test
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 8ea5dc5ee..3fd9cbcc8 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -799,10 +799,10 @@ gopkg.in/tomb.v1
gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
gopkg.in/yaml.v3
-# k8s.io/api v0.22.2
+# k8s.io/api v0.22.3
k8s.io/api/apps/v1
k8s.io/api/core/v1
-# k8s.io/apimachinery v0.22.2
+# k8s.io/apimachinery v0.22.3
k8s.io/apimachinery/pkg/api/resource
k8s.io/apimachinery/pkg/apis/meta/v1
k8s.io/apimachinery/pkg/conversion