Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker镜像自动退出 #191

Open
teazean opened this issue Nov 29, 2017 · 0 comments
Open

docker镜像自动退出 #191

teazean opened this issue Nov 29, 2017 · 0 comments

Comments

@teazean
Copy link
Owner

teazean commented Nov 29, 2017

一些基础镜像unbuntucentos都是默认缺省bash命令,如果是以 -d模式启动的话,bash会退出,导致docker认为container已经结束退出。

解决方式

  1. 额外可以使用-t,可以docker有自己的presudo-tty,让bash等在那里。
docker run -t -d centos ${image}
  1. 额外使用夯住进程的命令
docker run -d centos ${image} tail -f /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant