docker run -p 8000:80 image
container_linux.go:370
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "/usr/bin/python ./manage.py runserver 0:80": stat /usr/bin/python ./manage.py runserver 0:80: no such file or directory: unknown.
ERRO[0000] error waiting for container: context canceled
docker 的 CMD 格式有问题, 有参数的命令 要用数组 不能用都写到一个字符串里
错误:
CMD ["/usr/bin/python manage.py runserver 0:80"]
正确:
CMD ["/usr/bin/python", "manage.py", "runserver", "0:80"]
网友评论