基本Docker容器报告运行级别未知 [英] Basic Docker container reports runlevel unknown
问题描述
当我运行一个基本的Docker容器(来自Google Cloud Shell)时,如此
When I run a basic Docker container (from within Google Cloud Shell) like so
docker pull debian
docker run -i -t debian:wheezy /bin/bash
然后键入 runlevel
在运行容器的shell提示符下,运行级别为 unknown
。我应该安装( apt-get
)特定的包,以增加对运行级别的支持。如果是这样,哪些还有什么可能是错的?
and then type runlevel
at the running container's shell prompt, the run level is unknown
. Am I supposed to install (apt-get
) particular packages in order to add support for run levels. If so, which ones, or what else could be wrong?
推荐答案
Docker是一个应用程序隔离工具,而不是一个操作系统虚拟化工具。运行级别在操作系统级别,操作系统出现,挂载目录,并启动服务以实现运行级别。在容器中,您的应用程序启动,结束。您可以假定容器处于单一用户运行级别,因为您是访问环境的唯一用户,但安装应用程序确实不重要。
Docker is an application isolation tool, not an OS virtualization tool. Runlevel's are at the OS level, the OS comes up, mounts directories, and starts services to achieve a runlevel. In a container, your application is launched, the end. You can assume the container is at a single user run level, since you're the only user accessing the environment, but it really shouldn't matter for installing applications.
这篇关于基本Docker容器报告运行级别未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!