Azure 通过远程api设置Docker卷驱动程序选项
有没有办法通过“POST/containers/create”远程api设置Docker卷驱动程序选项?我想这样做:Azure 通过远程api设置Docker卷驱动程序选项,azure,docker,Azure,Docker,有没有办法通过“POST/containers/create”远程api设置Docker卷驱动程序选项?我想这样做: docker run -it -v $(docker volume create -d azurefile -o share=myshare):/data busybox 我可以使用下面的json创建一个卷并指定一个驱动程序,但我不确定是否有办法设置卷驱动程序选项 "HostConfig": { "Binds": ["myshare:/data"], "Vo
docker run -it -v $(docker volume create -d azurefile -o share=myshare):/data busybox
我可以使用下面的json创建一个卷并指定一个驱动程序,但我不确定是否有办法设置卷驱动程序选项
"HostConfig": {
"Binds": ["myshare:/data"],
"VolumeDriver": "azurefile"
}
似乎仅仅使用/containers/create是不可能的,但是可以通过先创建卷,然后将其装载到容器来实现
POST /volumes/create
{
"Name": "myvolume",
"Driver": "azurefile",
"DriverOpts": {
"share": "myshare"
}
}
POST /containers/create
{
"HostConfig": {
"Binds": ["myvolume:/data"],
"VolumeDriver": "azurefile"
}
}