【发布时间】:2020-03-24 18:47:53
【问题描述】:
我在某处读到 hello-world docker 映像是从头开始的,所以它没有外壳,那么它是如何执行 hello 可执行文件的?我们不需要shell来执行文件吗?
【问题讨论】:
-
命令在linux内核中运行,通常使用exec family of functions,所以你不需要shell。类似问题How does Docker run a command without invoking a command shell?
-
Don't we need a shell to execute a file ?- “shell”本身就是一个可执行文件。您不需要 shell 来执行该文件。只需执行它而不是 shell。
标签: linux docker dockerfile containers docker-container