Commit Graph

7 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 11869fa42a
fix panic on single-character volumes
Before this change, this would cause a panic:

    docker run -it --rm -v 1:/1 alpine
    panic: runtime error: index out of range

    goroutine 1 [running]:
    github.com/docker/cli/cli/compose/loader.isFilePath(0xc42027e058, 0x1, 0x557dcb978c20)
    ...

After this change, a correct error is returned:

    docker run -it --rm -v 1:/1 alpine
    docker: Error response from daemon: create 1: volume name is too short, names should be at least two alphanumeric characters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-21 01:38:52 +01:00
Daniel Nephin 9f73b8c718 Support parsing of named pipes for compose volumes.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-26 11:24:23 -04:00
Daniel Nephin 732261f774 Use compose volume spec parser for container volume flag
Restore testcases for Volume spec parsing.
And correctly interpret the parsed volume.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-21 11:16:04 -04:00
Daniel Nephin db6ff357a7 Some improvements to compose volume spec parsing
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-21 11:13:52 -04:00
Daniel Nephin 729d07a371 Compose: Improve error messages when resource creation/updates fail.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-01 15:03:04 -04:00
Daniel Nephin 10641c2aae Update imports.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-17 18:07:56 -04:00
Daniel Nephin 1630fc40f8 Import docker/docker/cli
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-17 17:40:59 -04:00