Starting container process caused “exec: \”/bin/sh\“: stat /bin/sh: no such file or directory”: unknown

后端 未结 2 916
情歌与酒
情歌与酒 2021-02-12 10:51

I want to understand how CMD and ENTRYPOINT works. So, I just created a very simple Dockerfile

FROM scratch

CMD echo \"Hello First\"

ENTRYPOINT ec         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-12 11:35

    I have solved a similar problem deleting all the Docker images with a

    docker rmi -f $(docker images -aq)
    

    and restarting Docker.

    Another option is to reset to factory defaults through the Docker desktop dashboard. Mind that this will remove all of your images, containers, settings so on so forth.

提交回复
热议问题