Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Basic Docker container reports runlevel unknown

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

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?

like image 261
Drux Avatar asked Jan 06 '23 17:01

Drux


1 Answers

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.

like image 135
BMitch Avatar answered Jan 08 '23 07:01

BMitch