说明(发布前可手动删除说明内容):
- 发布话题前请确认好标题与标签、确认你已经看过了论坛准则:论坛准则 - 社区论坛 - FIT2CLOUD 飞致云 ;
-
如有必要请附带以下信息:1Panel 版本、运行方式(安装包运行 or 源码运行 )、浏览器版本、更多描述或截图信息。
由于docker根目录空间已满,想将资源目录迁移至其他目录,迁移后镜像无法加载,还原后镜像也无法加载,望大神指导
当前运行版本:v1.10.2-lts docker 版本: 20.10.17
vim /etc/docker/daemon.json
{
"experimental": true,
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
},
"dns": ["114.114.114.114", "8.8.8.8"],
"data-root": "/data/docker"
}
vi /usr/lib/systemd/system/docker.service
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd --graph=/data/docker -H fd:// --containerd=/run/containerd/containerd.sock
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
[root@localhost /]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@localhost /]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
[root@localhost /]# docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 20.10.17
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
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 io.containerd.runc.v2 io.containerd.runtime.v1.linux nvidia
Default Runtime: runc
Init Binary: docker-init
containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-1160.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 52
Total Memory: 62.35GiB
Name: localhost.localdomain
ID: UG5E:I4OZ:TKTT:KZUY:YQAB:DXC2:GEL5:HBQB:ZX5Y:4FNG:NQJS:YOHY
Docker Root Dir: /data/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false