记录: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博客