Docker容器运行时出现电源故障,无法启动容器

时间:2017-05-15 17:33:05

标签: docker docker-compose

我的docker容器正在运行时发生电源故障。

我无法通过docker-compose up启动我的容器。我试过了docker-compose down,它给了我以下错误: 删除docker_db_1 ...错误

  

错误:对于docker_db_1驱动程序devicemapper无法删除root   文件系统   1b8aab6f0e543e4ae06f4cb7b803f6383f6aa99f3b63394b0b45264304728b3a:   无法删除设备   d83eae2675e0dae691d45ca4f0a08767bc5b225f335b3562363a83fca7575238:   设备忙碌删除网络docker_default警告:网络   找不到docker_default。

sudo docker-compose --verbose rm db

  

compose.config.config.find:使用配置文件:   ./docker-compose.yaml docker.auth.find_config_file:尝试路径:   [' /root/.docker/config.json' ;,' /root/.dockercfg']   docker.auth.find_config_file:找不到配置文件   compose.cli.command.get_client:docker-compose版本1.11.2,build   dfed245b docker-py版本:2.1.0 CPython版本:3.6.1 OpenSSL   版本:OpenSSL 1.1.0e 2017年2月16日compose.cli.command.get_client:   Docker base_url:http + docker:// localunixsocket   compose.cli.command.get_client:Docker版本:版本= 17.04.0-ce,   ApiVersion = 1.28,MinAPIVersion = 1.12,GitCommit = 4845c567eb,   GoVersion = go1.8,Os = linux,Arch = amd64,KernelVersion = 4.10.13-1-ARCH,   构建时= 2017-04-08T18:55:45.235834955 + 02:00   compose.cli.verbose_proxy.proxy_callable:docker containers< -   (all = True,filters = {' label':[' com.docker.compose.project = docker']})   compose.cli.verbose_proxy.proxy_callable:docker containers - > (名单   共有2个项目)compose.cli.verbose_proxy.proxy_callable:docker   inspect_container< -   (' 1b8aab6f0e543e4ae06f4cb7b803f6383f6aa99f3b63394b0b45264304728b3a')   compose.cli.verbose_proxy.proxy_callable:docker inspect_container - >   {' AppArmorProfile':'',' Args':[' mysqld'],'配置':   {' ArgsEscaped':是的,               ' AttachStderr':错,               ' AttachStdin':错,               ' AttachStdout':错,               ' Cmd':[' mysqld'],               '域名':'',               ' Entrypoint':[' docker-entrypoint.sh'],               ' Env':[' MYSQL_USER = chapp',... compose.cli.verbose_proxy.proxy_callable:docker inspect_container< -   (' e9eba78b88280f2a8c853deee187ac707330eb753c132d7bf47b219ce44d8c0e')   compose.cli.verbose_proxy.proxy_callable:docker inspect_container - >   {' AppArmorProfile':'',' Args':[' rabbitmq-server'],'配置':   {' AttachStderr':错,               ' AttachStdin':错,               ' AttachStdout':错,               ' Cmd':[' rabbitmq-server'],               '域名':'',               ' Entrypoint':[' docker-entrypoint.sh'],               ' Env':[' PATH = / opt / rabbitmq / sbin:/ usr / local / sbin:/ usr / local / bin:/ usr / sbin:/ usr / bin:/ sbin: / bin中&#39 ;,                       ' RABBITMQ_LOGS = - ',...要删除docker_db_1您确定吗? [yN] y compose.cli.verbose_proxy.proxy_callable:docker   容器< - (全部= True,过滤器= {'标签':   [' com.docker.compose.project =搬运工']})   compose.cli.verbose_proxy.proxy_callable:docker containers - > (名单   共有2个项目)compose.cli.verbose_proxy.proxy_callable:docker   inspect_container< -   (' 1b8aab6f0e543e4ae06f4cb7b803f6383f6aa99f3b63394b0b45264304728b3a')   compose.cli.verbose_proxy.proxy_callable:docker inspect_container - >   {' AppArmorProfile':'',' Args':[' mysqld'],'配置':   {' ArgsEscaped':是的,               ' AttachStderr':错,               ' AttachStdin':错,               ' AttachStdout':错,               ' Cmd':[' mysqld'],               '域名':'',               ' Entrypoint':[' docker-entrypoint.sh'],               ' Env':[' MYSQL_USER = chapp',... compose.cli.verbose_proxy.proxy_callable:docker inspect_container< -   (' e9eba78b88280f2a8c853deee187ac707330eb753c132d7bf47b219ce44d8c0e')   compose.cli.verbose_proxy.proxy_callable:docker inspect_container - >   {' AppArmorProfile':'',' Args':[' rabbitmq-server'],'配置':   {' AttachStderr':错,               ' AttachStdin':错,               ' AttachStdout':错,               ' Cmd':[' rabbitmq-server'],               '域名':'',               ' Entrypoint':[' docker-entrypoint.sh'],               ' Env':[' PATH = / opt / rabbitmq / sbin:/ usr / local / sbin:/ usr / local / bin:/ usr / sbin:/ usr / bin:/ sbin: / bin中&#39 ;,                       ' RABBITMQ_LOGS = - ',...删除docker_db_1 ... compose.parallel.feed_queue:待定:{} compose.parallel.feed_queue:启动生产者线程      compose.cli.verbose_proxy.proxy_callable:docker remove_container< -   (' 1b8aab6f0e543e4ae06f4cb7b803f6383f6aa99f3b63394b0b45264304728b3a&#39 ;,   v = False)compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()

     

compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()

...

  

compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()   compose.parallel.feed_queue:待定:set()删除docker_db_1 ...   错误compose.parallel.feed_queue:待定:set()

     

错误:对于docker_db_1驱动程序devicemapper无法删除root   文件系统   1b8aab6f0e543e4ae06f4cb7b803f6383f6aa99f3b63394b0b45264304728b3a:   无法删除设备   d83eae2675e0dae691d45ca4f0a08767bc5b225f335b3562363a83fca7575238:   设备忙碌

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

您可以删除容器,就像您一样,或尝试添加

--force-recreate
运行命令的

参数,这将是recreate the container by force

答案 1 :(得分:0)

我解决了它:

sudo rm -rf /var/lib/docker/containers/1b8aab6f0e543e4ae06f4cb7b803f6383f6aa99f3b63394b0b45264304728b3a