NAME

API::Docker::Type::Mount - One entry of a container's Mounts specification

VERSION

version 0.004

DESCRIPTION

Generated from the Mount definition of spec/v1.51.yaml, which the swagger leaves undescribed. Nothing in paths: reaches it either; it is one entry of HostConfig.Mounts and TaskSpec.ContainerSpec.Mounts.

The four *Options fields are objects the swagger writes inline rather than referencing, so each becomes a class named after this one: API::Docker::Type::Mount::BindOptions, API::Docker::Type::Mount::VolumeOptions, API::Docker::Type::Mount::ImageOptions and API::Docker::Type::Mount::TmpfsOptions.

target

Container path.

source

Mount source (e.g. a volume name, a host path). The source cannot be specified when using Type=tmpfs. For Type=bind, the source path must either exist, or the CreateMountpoint must be set to true to create the source path on the host if missing.

For Type=npipe, the pipe must exist prior to creating the container.

type

The mount type. Available types:

  • bind Mounts a file or directory from the host into the container. The Source must exist prior to creating the container.

  • cluster a Swarm cluster volume

  • image Mounts an image.

  • npipe Mounts a named pipe from the host into the container. The Source must exist prior to creating the container.

  • tmpfs Create a tmpfs with the given options. The mount Source cannot be specified for tmpfs.

  • volume Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are not removed when the container is removed.

The swagger types this field as an allOf around a single $ref to MountType, which is a string and not an object, so it is a plain Str here.

read_only

Whether the mount should be read-only.

consistency

The consistency requirement for the mount: default, consistent, cached, or delegated.

bind_options

Optional configuration for the bind type. See API::Docker::Type::Mount::BindOptions.

volume_options

Optional configuration for the volume type. See API::Docker::Type::Mount::VolumeOptions.

image_options

Optional configuration for the image type. See API::Docker::Type::Mount::ImageOptions.

tmpfs_options

Optional configuration for the tmpfs type. See API::Docker::Type::Mount::TmpfsOptions.

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-api-docker/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.