From this Dockerfile documentation:
Unlike the shell form, the exec form does not invoke a command shell. This means that normal shell processing does not happen. For example, CMD [ "echo", "$HOME" ]
will not do variable substitution on $HOME
. If you want shell processing then either use the shell form or execute a shell directly, for example: CMD [ "sh", "-c", "echo", "$HOME" ]
.
What your command actually does is passes the arguments "0.0.0.0:3000"
, ">>"
and "django.log"
to "/srv/manage.py"
. What you actually need is
CMD "/srv/manage.py runserver 0.0.0.0:3000 >> django.log"
(or)
CMD ["/srv/manage.py", "runserver 0.0.0.0:3000 >> django.log"]