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

相关推荐
孙克旭_1 天前
k8s基础组件与创建资源
运维·docker·容器·kubernetes
java_logo2 天前
Docker 部署 EmulatorJS:轻松搭建浏览器复古游戏平台
游戏·docker·容器·复古游戏·轩辕镜像·emulatorjs·红白机
方便面不加香菜2 天前
Docker Container --容器及容器的操作案例详解
运维·docker·容器
无人生还别怕2 天前
如何搭建docker仓库(轻量级)registry
linux·运维·docker·云原生·容器·registry·openanolisos
YYYing.3 天前
【K8s系列 (一) 】Docker与容器(上篇)
docker·云原生·容器·kubernetes
csdn_aspnet3 天前
使用 Docker 和 RedisInsight 设置 Redis 以进行本地开发
redis·docker·容器·redisinsight
余槐i3 天前
MySQL 8.0 联合索引走错:为什么加了索引查询反而从 200ms 变成 8s
java·spring boot·mysql·docker·性能优化
csdn_aspnet3 天前
如何在本地 Docker 容器中运行 Redis,并使用 Redis Insight 和 Redis CLI 进行管理
redis·docker·容器
且从容.3 天前
Ubuntu 安装 Docker
linux·ubuntu·docker
todoitbo3 天前
我在 Mac 上用 Docker 部署 Nexent:从拉取镜像到接入模型
macos·docker·大模型·ai智能体·nexent·快速入门与环境准备