记录:Docker 安装记录

今天在安装 ollama 时发现无法指定安装目录,而且它的命令行反馈内容很像 docker ,而且它下载的模型也是放在 C 盘,那么如果我 C 盘空间不足,就装不了 deepseek-r1:70b ,于是想起来之前安装 Docker 的时候也遇到过类似问题:

也是无法指定路径,导致 C 盘空间不足时制作容器失败,因此想试试看 ollama 安装能不能也这样玩,但是后来用不到就忘记了当初是怎么弄的了,刚刚翻了下硬盘,还好找到当初的安装过程记录文件,但是博客里面居然没有记录,于是写篇文章记录下:

复制代码
mklink /J "C:\ProgramData\Docker" "E:\Studio\docker\images"
mklink /J "C:\Program Files\Docker" "D:\Program Files\Docker"

看起来用的虚拟目录映射法搞定的。

复制代码
PS E:\Studio\docker> echo "以下为重新设置安装目录后"
以下为重新设置安装目录后
PS E:\Studio\docker> docker info
Client:
 Debug Mode: false

Server:
ERROR: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
errors pretty printing info
PS E:\Studio\docker> docker info
Client:
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 19.03.8
 Storage Driver: windowsfilter
  Windows:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics internal l2bridge l2tunnel nat null overlay private transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
 Swarm: inactive
 Default Isolation: hyperv
 Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
 Operating System: Windows 10 Pro Version 1809 (OS Build 17763.973)
 OSType: windows
 Architecture: x86_64
 CPUs: 20
 Total Memory: 63.69GiB
 Name: ZD01
 ID: DCEQ:NMQO:QDKA:M6BF:DFTC:7T67:WJK6:CIXO:JNX5:GWNF:RZ3O:QGXZ
 Docker Root Dir: E:\Studio\docker\images
 Debug Mode: true
  File Descriptors: -1
  Goroutines: 28
  System Time: 2023-04-03T16:41:37.0441451+08:00
  EventsListeners: 1
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Registry Mirrors:
  https://mirror.ccs.tencentyun.com/
  http://hub-mirror.c.163.com/
  https://docker.mirrors.ustc.edu.cn/
 Live Restore Enabled: false
 Product License: Community Engine

等下试试这办法对 ollama 是否有效。

补充: ollama 也用此法搞定了自定义安装路径以及模型安装路径。

参考文献:

Windows修改Docker安装目录修改Docker镜像目录,镜像默认存储位置存放到其它盘_docker安装在d盘-CSDN博客

相关推荐
小Pawn爷9 分钟前
1.Docker基础
运维·docker·容器
chinesegf12 分钟前
清理docker残留镜像images
运维·docker·容器
小Pawn爷30 分钟前
2.Docker的存储
运维·docker·容器
gustt36 分钟前
构建全栈AI应用:集成Ollama开源大模型
前端·后端·ollama
礼拜天没时间.1 小时前
自定义镜像制作——从Dockerfile到镜像
linux·docker·容器·centos·bash
luffy54592 小时前
windows下通过docker-desktop创建redis实例
windows·redis·docker·容器
weixin_404679312 小时前
docker部署ollama
运维·docker·容器
Hi202402172 小时前
在Docker容器中安全运行OpenClaw:无需虚拟机,体验AI助手
人工智能·安全·docker·openclaw
江湖有缘3 小时前
Docker部署music-tag-web音乐标签编辑器
前端·docker·编辑器
计算机小手3 小时前
Docker 部署 OpenClaw 汉化版,畅玩个人 AI 智能代理
经验分享·docker·aigc·开源软件