docker: executable file not found in $PATH

后端 未结 10 1071
刺人心
刺人心 2020-11-28 02:02

I have a docker image which installs grunt, but when I try to run it, I get an error:

Error response from daemon: Cannot start container foo_1         


        
10条回答
  •  青春惊慌失措
    2020-11-28 02:31

    A Docker container might be built without a shell (e.g. https://github.com/fluent/fluent-bit-docker-image/issues/19).

    In this case, you can copy-in a statically compiled shell and execute it, e.g.

    docker create --name temp-busybox busybox:1.31.0
    docker cp temp-busybox:/bin/busybox busybox
    docker cp busybox mycontainerid:/busybox
    docker exec -it mycontainerid /bin/busybox sh
    

提交回复
热议问题