首页 > 解决方案 > Docker 启动容器:创建覆盖挂载时出错 ... /merged:没有这样的文件或目录

问题描述

我在 raspberry pi 4 上运行 docker 时遇到问题,除了包含容器/图像的文件夹外,我清除了所有问题。重新安装docker,运行helloworld,运行正常。安装了搬运工来管理容器,其中几个启动,但一个特定的,homeassistant,没有

它报告

pi@raspberrypi:~ $ docker start homeassistant
Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/7c4732337e167e0f8178b8667bddc0393c2c1e4f7ffba5d68fe57379cc1de7c0/merged: no such file or directory
Error: failed to start containers: homeassistant

这是 docker info 的结果

pi@raspberrypi:~ $ docker info
Client:
 Debug Mode: false

Server:
 Containers: 7
  Running: 4
  Paused: 0
  Stopped: 3
 Images: 32
 Server Version: 19.03.8
 Storage Driver: overlay2
  Backing Filesystem: <unknown>
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.97-v7l+
 Operating System: Raspbian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: armv7l
 CPUs: 4
 Total Memory: 3.814GiB
 Name: raspberrypi
 ID: CS34:4SMJ:FTCR:T3O3:JVWH:LNEC:RWIE:2D7X:435Z:4WHM:UZZZ:CMS3
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

这是覆盖文件夹的内容

pi@raspberrypi:~ $ sudo ls /var/lib/docker/overlay2/7c4732337e167e0f8178b8667bddc0393c2c1e4f7ffba5d68fe57379cc1de7c0/
diff  link  lower  work

我检查了 overlay2 文件夹,确实没有合并文件夹。我试过创建一个空的,但是一旦我尝试启动容器,它就会被删除。当涉及到容器时,此文件夹表示什么以及如何解决它?理想情况下,我想保留容器,否则我将不得不重新设置整个东西。

标签: dockerraspberry-pi4home-assistant

解决方案


推荐阅读