Created
August 19, 2015 09:36
-
-
Save ikbear/dbb05e1b640ad962f6f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/bin/sh -c "while true; do echo hello world; sleep 1; done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
为了保证 Docker Container 进程不退出,从 Ubuntu 系统镜像启动进程的时候需要执行一个不会退出的命令。如果
/bin/sh
不带上-c
参数,在宿主系统下无法通过Ctrl-C
来退出进程。