python - command substitution in docker CMD -


using:

cmd ["$(pipenv --venv)/bin/python3", "main.py", "/root/uploads"] 

causes error on docker run:

error response daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"$(pipenv --venv)/bin/python3\\\": stat $(pipenv --venv)/bin/python3: no such file or directory\"\n" 

is there way make evaluate command substitutions $(pipenv --venv)/bin/python3 in cmd section?

change below

cmd ["bash", "-c", "$(pipenv --venv)/bin/python3 main.py /root/uploads"] 

if still gives issue, change $ $$


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -