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
Post a Comment