Device or Resource Busy - Docker

An error occurred while executing apt-get -y upgradeon a new Ubuntu 14.04 machine with an ubuntu:latest(Xenial) image :

Setting up makedev (2.3.1-93ubuntu2~ubuntu16.04.1) ...
mv: cannot move 'console-' to 'console': Device or resource busy
makedev console c 5 1 root tty 0600: failed

I have a new docker installation on new Ubuntu 14.04 using the following command:

sudo apt-get remove docker docker-engine
sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
wget -qO- https://get.docker.com/ | sudo sh
su - $USER # To logout and login

Docker for hello-worldworking fine:

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pull complete 
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://cloud.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

When I create an empty docker container with:

docker run -it ubuntu bash

and performed the following:

apt-get update
apt-get install -y debconf-utils
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
apt-get update
apt-get -y upgrade

Error:

Setting up makedev (2.3.1-93ubuntu2~ubuntu16.04.1) ...
mv: cannot move 'console-' to 'console': Device or resource busy
makedev console c 5 1 root tty 0600: failed

occurs when the last apt-get -y upgrade

The full docker log is included: https://gist.github.com/alvations/ebe7175b984213d6f64a3c779ba3249e

+6
source share
2 answers

/, apt-get -y upgrade , / . , , ( ).

, , apt-get -y upgrade, , , , :

https://bugs.launchpad.net/ubuntu/+source/makedev/+bug/1675163

- MAKEDEV postinst script, , script . , makedev. , , , , Ubuntu (-).

:, , makedev docker/dev/ - makedev, , , postinstall script . script :

# don't stomp on LXC users
if grep -q container=lxc /proc/1/environ
then
    echo "LXC container detected, aborting due to LXC managed /dev."
    exit 0
fi

, , lxc,

docker run -ti -e "ImNotAnLXCcontainer=lxc" ubuntu

, script , /dev/entries :

Setting up makedev (2.3.1-93ubuntu2~ubuntu16.04.1) ...
LXC container detected, aborting due to LXC managed /dev.
+4

. ​​ , , , , . , , , - 0. , , .

, - apt-get upgrade. ubuntu:latest, Docker . , apt-get upgrade, , docker pull ubuntu:latest.

, latest https://github.com/docker-library/repo-info/blob/master/repos/ubuntu/remote/latest.md. 6 , . , , , - upgrade, . , , .

, debian , , , - , .

+3

Source: https://habr.com/ru/post/1016377/


All Articles