問題: Docker預設的data path在/vat/lib/docker, 這會隨著container越來越多而佔去許多容量,所以修改路徑。
解決方法: 在/etc/docker底下新增檔案daemon.json寫入
{
"live-restore": true, #可以stop docker daemon不影響container
"data-root": "/project/docker",
"debug": true, #debug log
"insecure-registries": [],#配置docker的私庫地址
"registry-mirrors": [
"https://d8b3zdiw.mirror.aliyuncs.com"
],
"insecure-registries": [
"https://ower.site.com"
],
}
重啟後生效:
systemctl daemon-reload
systemctl restart docker.service
參考文件: https://docs.docker.com/engine/reference/commandline/dockerd
No comments:
Post a Comment