美文网首页
docker 报错

docker 报错

作者: Joncc | 来源:发表于2020-12-11 08:25 被阅读0次

    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"]
    

    相关文章

      网友评论

          本文标题:docker 报错

          本文链接:https://www.haomeiwen.com/subject/mjrdgktx.html