spiegel_podman/pkg/specgen/generate
Valentin Rothberg 9e78185e37 volumes: be more tolerant and fix infinite loop
Make Podman more tolerant when parsing image volumes during container
creation and further fix an infinite loop when checking them.

Consider `VOLUME ['/etc/foo', '/etc/bar']` in a Containerfile.  While
it looks correct to the human eye, the single quotes are wrong and yield
the two volumes to be `[/etc/foo,` and `/etc/bar]` in Podman and Docker.

When running the container, it'll create a directory `bar]` in `/etc`
and a directory `[` in `/` with two subdirectories `etc/foo,`.  This
behavior is surprising to me but how Docker behaves.  We may improve on
that in the future.  Note that the correct way to syntax for volumes in
a Containerfile is `VOLUME /A /B /C` or `VOLUME ["/A", "/B", "/C"]`;
single quotes are not supported.

This change restores this behavior without breaking container creation
or ending up in an infinite loop.

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2014149
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-08 10:17:06 +01:00
..
kube Use SplitN(2) when copying env variables 2021-10-19 15:56:35 -04:00
config_linux.go Add filepath glob support to --security-opt unmask 2021-05-04 14:40:43 -04:00
config_linux_cgo.go migrate Podman to containers/common/libimage 2021-05-05 11:30:12 +02:00
config_linux_nocgo.go migrate Podman to containers/common/libimage 2021-05-05 11:30:12 +02:00
config_linux_test.go Add filepath glob support to --security-opt unmask 2021-05-04 14:40:43 -04:00
container.go implement init containers in podman 2021-08-04 14:14:36 -05:00
container_create.go InfraContainer Rework 2021-08-26 16:05:16 -04:00
namespaces.go InfraContainer Rework 2021-08-26 16:05:16 -04:00
oci.go InfraContainer Rework 2021-08-26 16:05:16 -04:00
pod_create.go InfraContainer Rework 2021-08-26 16:05:16 -04:00
ports.go Merge pull request #11314 from Luap99/expose-ports 2021-08-25 09:29:03 -04:00
security.go migrate Podman to containers/common/libimage 2021-05-05 11:30:12 +02:00
storage.go volumes: be more tolerant and fix infinite loop 2021-11-08 10:17:06 +01:00
validate.go Allow a value of -1 to set unlimited pids limit 2021-10-19 13:55:41 -04:00