spiegel_podman/pkg/specgen
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
..
generate volumes: be more tolerant and fix infinite loop 2021-11-08 10:17:06 +01:00
config_unsupported.go migrate Podman to containers/common/libimage 2021-05-05 11:30:12 +02:00
container_validate.go bump go module to v3 2021-02-22 09:03:51 +01:00
namespaces.go Add support for pod inside of user namespace. 2021-08-09 15:17:22 -04:00
pod_validate.go --infra-name command line argument 2021-07-15 21:27:51 -03:00
podspecgen.go InfraContainer Rework 2021-08-26 16:05:16 -04:00
specgen.go Network interface 2021-08-24 12:28:03 +02:00
volumes.go libpod/option.go remove error stutter from wrap/wraf 2021-08-17 16:14:02 +05:30