DockerCLI/cli/compose
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
..
convert cli/compose/convert: driverObjectConfig - result 1 (error) is always nil (unparam) 2019-10-31 19:22:26 +01:00
interpolation cli: remove unnecessary newlines (whitespace) 2019-10-31 19:22:36 +01:00
loader fix panic on single-character volumes 2020-02-21 01:38:52 +01:00
schema docker run: specify cgroup namespace mode with --cgroupns 2020-01-29 22:50:37 +00:00
template cli/compose/template: Using the variable on range scope `tc` in function literal (scopelint) 2019-10-31 19:22:38 +01:00
types docker run: specify cgroup namespace mode with --cgroupns 2020-01-29 22:50:37 +00:00