You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在运行时可以指定新的命令来替代镜像设置中的这个默认命令,比如,`ubuntu`镜像默认的`CMD`是`/bin/bash`,如果我们直接`docker run -it ubuntu`的话,会直接进入`bash`。我们也可以在运行时指定运行别的命令,如`docker run -it ubuntu cat /etc/os-release`。这就是用`cat /etc/os-release`命令替换了默认的`/bin/bash`命令了,输出了系统版本信息。