sun
|
docker里面有一个容器不能正常启动了,配置后重启了docker服务,没响应。改了配置文件后docker服务能启动,但是里面的镜像和容器都找不到了,即运行docker ps 和dockerimages 为空。查看/var/lib/docker/containters里面的容器文件都在。 目前的配置如下: vim /etc/sysconfig/docker 内容:other_args="--graph=/var/lib/docker" vim /etc/docker/daemon.json 内容:{ "storage-driver": "devicemapper" } vim /etc/default/docker 内容为空
/etc/systemd/system/docker.service.d/docker.conf 文件不存在。 试验发现只要 vim /etc/docker/daemon.json 中有这一行 { "storage-driver": "devicemapper" } 就能启动,去掉就不能启动,试着在 vim /etc/sysconfig/docker中加上挂载目录 other_args="--graph=/var/lib/docker" ,执行docker ps仍是空。 docker info 输入如下: Containers: 0 Running: 0Paused: 0 Stopped: 0 Images: 0 Server Version: 18.03.0-ce Storage Driver: devicemapper Pool Name: docker-253:4-134333542-pool Pool Blocksize: 65.54kB Base Device Size: 10.74GB Backing Filesystem: xfs Udev Sync Supported: true Data file: /dev/loop0 Metadata file: /dev/loop1 Data loop file: /var/lib/docker/devicemapper/devicemapper/data Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata Data Space Used: 11.8MB Data Space Total: 107.4GB Data Space Available: 97.47GB Metadata Space Used: 581.6kB Metadata Space Total: 2.147GB Metadata Space Available: 2.147GB Thin Pool Minimum Free Space: 10.74GB Deferred Removal Enabled: true Deferred Deletion Enabled: true Deferred Deleted Device Count: 0 Library Version: 1.02.140-RHEL7 (2017-05-03) Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c runc version: 4fc53a81fb7c994640722ac585fa9ca548971871 init version: 949e6fa Security Options: seccomp Profile: default Kernel Version: 3.10.0-693.21.1.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 15.44GiB Name: kunlunweb ID: EYG6:K3TU:U475:TBAA:E66O:DGYJ:XPEI:2SPB:RRGB:SXVQ:WQ6P:KOEU Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device. 不知道还能不能挂上我的那些容器? |
phpersay
|
不晓得是不是和我遇到的情况是一样的,我的景象和容器一夜之间全部消失了。。。。。。。。。
对于开发者来说,搭环境是家常便饭。可是莫名其妙的丢失我半年的积蓄就痛心疾首了。Docker创建的镜像和容器全部消失了,没了 ……ps -a没有……images也没有,什么情况呢?周末没有梦游写代码呀 |
曼妮
|
到了这里很多朋友觉得docker可能有点难以上手。某些方面的知识存在不足,没关系,我为大家准备了一套精品PHP中高级进阶学习教程,需要加微信:PHPopen888,还可加入微信群,分享docker,微服务,tp,laravel,swoole等教程,各种大牛都是3-8年PHP开发者,还有每天都有课程讲解,助你进阶中高级PHP程序员,增值涨薪! |
yang
|
镜像丢失在一种情况下是必现的,当存储镜像的磁盘达到80%以上时,镜像会部分丢失 |