首页 > 代码库 > something important

something important

docker run ubuntu /bin/echo ‘Hello world‘

运行这条命令,docker做了什么

Well, Docker containers only run as long as the command you specify is active. Therefore, in the above example, the container stops once the command is executed.

命令激活的时候docker容器才会运行。也就是说,命令执行完了,docker容器也就停止运行了(不是docker服务)。

something important