wooden-thailand-8386
05/27/2022, 3:08 PM./pants run :linux-pyenv --docker-run-args="--rm -it -v $(pwd):/app"
which works fine, flags and volume get assigned as expected.
Now when I move that into the pants.toml
file, which I did as follow:
[docker]
run_args = "--rm -it -v $(pwd):/app"
then I get this error:
11:02:24.76 [INFO] Initializing scheduler...
11:02:24.95 [INFO] Scheduler initialized.
11:02:55.41 [INFO] Completed: Building docker image linux-pyenv:latest
docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
See 'docker run --help'.
If I were to guess, this looks like some parsing/casting issue when reading from the toml file and sending it to docker since when I run directly from the command line it works as expected. I’ve already tried single quotes, escaping “$” and parenthesis but nothing seems to work. 😞hundreds-father-404
05/27/2022, 3:10 PMpants.toml
. Instead, you could use "%(buildroot)s
wooden-thailand-8386
05/27/2022, 3:12 PMhundreds-father-404
05/27/2022, 3:14 PMwooden-thailand-8386
05/27/2022, 3:14 PM