基本 Docker 容器报告运行级别未知 [英] Basic Docker container reports runlevel unknown

查看:20
本文介绍了基本 Docker 容器报告运行级别未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我像这样运行一个基本的 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

然后在运行容器的shell提示符下输入runlevel,运行级别为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. Runlevels 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆