运行命令时:
docker run -it -v some_volume:/abc/xyz --volume-driver=btrfs a_docker_image /bin/bash
终端显示:
docker: Error response from daemon: create some_volume: Error looking up volume plugin btrfs: plugin not found.
=====================
但如果先创建卷:
docker volume create --opt type=btrfs --name some_volume
它将成功创建卷。现在,如果我尝试运行容器并创建一个新卷:
docker run -it -v some_volume:/abc/xyz --volume-driver=btrfs a_docker_image /bin/bash
它显示(当然这是有道理的,因为已经创建了同名卷):
docker: Error response from daemon: create some_volume: conflict: volume name must be unique.
如果我尝试使用现有卷运行容器:
docker run -it -v some_volume:/abc/xyz a_docker_image /bin/bash
它返回:
docker: Error response from daemon: missing device in volume options.
=====================
谁能帮我告诉我如何为 docker 安装卷插件 btrfs?除了一些关于插件的介绍(但不是如何安装),我还没有找到任何有用的信息。提前致谢。
正如@forevergenin 在评论中所建议的,这是我的 docker 环境:
docker version
Client:
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 18:13:28 2016
OS/Arch: darwin/amd64
Server:
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 19:36:04 2016
OS/Arch: linux/amd64
docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 39
Server Version: 1.11.0
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 121
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge
Kernel Version: 4.1.19-boot2docker
Operating System: Boot2Docker 1.11.0 (TCL 7.0); HEAD : 32ee7e9 - Wed Apr 13 20:06:49 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 996.1 MiB
Name: default
ID: 74TB:OVH5:S3GD:UQUG:ILWG:5NVH:2MSH:5H7R:A5H4:GSLV:2Q6D:ZIR6
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug mode (client): false
Debug mode (server): true
File Descriptors: 15
Goroutines: 32
System Time: 2016-08-15T13:57:03.866016657Z
EventsListeners: 0
Username: thyrlian
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox