I have a bash script that composes a docker run
command chaining different volumes with -v
:
VOL_ONE="-v $PWD/path/one:/home/docker/app/path/one"
VOL_TWO="-v $PWD/path/two:/home/docker/app/path/two"
RUN_VOLUMES="$VOL_ONE $VOL_TWO"
docker run --rm -it $RUN_VOLUMES docker.myserver.io/path/to/image:latest command
It runs absolutely fine when I use bash to run it.
However when I run the exact same script using zsh instead of bash I get:
docker: Error response from daemon: invalid volume specification
I've tried both on Ubuntu and macOS, getting the exact same problem.