0

I am trying to give dynamic port, thread, and workers while running the docker image but i am getting an error

[root]# docker run -it  -p 8080:8080  --env-file ./env.list  ff50c09659a0
/usr/bin/gunicorn: line 4: import: command not found
/usr/bin/gunicorn: line 5: import: command not found
/usr/bin/gunicorn: line 7: from: command not found
/usr/bin/gunicorn: gunicorn: line 10: syntax error near unexpected token `('
/usr/bin/gunicorn: gunicorn: line 10: `    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])'

In the docker file I am using the ENTRYPOINT

ENTRYPOINT ["/bin/bash","gunicorn","-b :","$port","-w","$worker","-t","$thread","--graceful-timeout","$time","api:APP"]

Can anyone suggest why I am getting this error?

Rituraj kumar
  • 349
  • 1
  • 4
  • 15

1 Answers1

0

Hey guys got it solved just by changing the ENTRYPOINT

ENTRYPOINT ["/bin/bash","-c","gunicorn -b :$port -w $worker -t $thread --timeout 300 --graceful-timeout $time api:APP"]
Rituraj kumar
  • 349
  • 1
  • 4
  • 15