Docker volume plugins

   日期:2024-12-27    作者:b1253178 移动:http://mip.riyuangf.com/mobile/quote/57095.html

Docker Engine volume plugins enable Engine deployments to be integrated with external storage systems such as Amazon EBS, and enable data volumes to persist beyond the lifetime of a single Docker host. See the plugin documentation for more information.

  • If used as part of the v2 plugin architecture, mountpoints that are part of paths returned by the plugin must be mounted under the directory specified by in the plugin configuration ( )
  • Add field to response ( )
  • Add to get capabilities of the volume driver ( )
  • Add which gets the details about the volume ( )
  • Add which lists all volumes owned by the driver ( )
  • Initial support for volume driver plugins ( )

To give a container access to a volume, use the and flags on the command. The (or ) flag accepts a volume name and path on the host, and the flag accepts a driver type.

The (or ) flag takes a value that is in the format . The two parts of the value are separated by a colon () character.

  • The volume name is a human-readable name for the volume, and cannot begin with a character. It is referred to as in the rest of this topic.
  • The is the path on the host (v1) or in the plugin (v2) where the volume has been made available.

Specifying a in conjunction with a allows you to use plugins such as to manage volumes external to a single host, such as those on EBS.

The container creation endpoint () accepts a field of type allowing to specify the name of the driver. If not specified, it defaults to (the default driver for local volumes).

If a plugin registers itself as a when activated, it must provide the Docker Daemon with writeable paths on the host filesystem. The Docker daemon provides these paths to containers to consume. The Docker daemon makes the volumes available by bind-mounting the provided paths into the containers.

Request:

Instruct the plugin that the user wants to create a volume, given a user specified volume name. The plugin does not need to actually manifest the volume on the filesystem yet (until is called). is a map of driver specific options passed through from the user request.

Response:

Respond with a string error if an error occurred.

Request:

Delete the specified volume from disk. This request is issued when a user invokes to remove volumes associated with a container.

Response:

Respond with a string error if an error occurred.

Request:

Docker requires the plugin to provide a volume, given a user specified volume name. is called once per container start. If the same is requested more than once, the plugin may need to keep track of each new mount request and provision at the first mount request and deprovision at the last corresponding unmount request.

is a unique ID for the caller that is requesting the mount.

Response:

  • v1

  • v2

is the path on the host (v1) or in the plugin (v2) where the volume has been made available.

is either empty or contains an error string.

Request:

Request the path to the volume with the given .

Response:

  • v1

  • v2

Respond with the path on the host (v1) or inside the plugin (v2) where the volume has been made available, and/or a string error if an error occurred.

is optional. However, the plugin may be queried again later if one is not provided.

Request:

Docker is no longer using the named volume. is called once per container stop. Plugin may deduce that it is safe to deprovision the volume at this point.

is a unique ID for the caller that is requesting the mount.

Response:

Respond with a string error if an error occurred.

Request:

Get info about .

Response:

  • v1

  • v2

Respond with a string error if an error occurred. and are optional.

Request:

Get the list of volumes registered with the plugin.

Response:

  • v1

  • v2

Respond with a string error if an error occurred. is optional.

Request:

Get the list of capabilities the driver supports.

The driver is not required to implement . If it is not implemented, the default values are used.

Response:


特别提示:本信息由相关用户自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


举报收藏 0评论 0
0相关评论
相关最新动态
推荐最新动态
点击排行
{
网站首页  |  关于我们  |  联系方式  |  使用协议  |  隐私政策  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2020018471号