Skip to content

Mount Module

This module provides objects for managing docker mount instances.

MountFile

Represents a file to be binded to a docker container.

Attributes:

  • template_name str - Name of the jinja template.
  • target_path str - Local file system path.
  • volume_driver str - Type of docker volume.
  • temporary_file Optional[TemporaryFile] - A mounted instance of a TemporaryFile.
  • mount Optional[Mount] - An instance of the DockerMount.
  • template_variables Optional[Dict[Any, Any]] - Jinja template variables.

Config

Pydantic Configuration.

volume_name

 | def volume_name() -> str

Name of the volume.

source_path

 | def source_path() -> str

Temporary file path name.

start

 | def start() -> None

Start the volume mount.

stop

 | def stop() -> None

Stop the volume mount.

MountPoint

def MountPoint(*, template_name: str, target_path: str, template_variables: Optional[Dict[Any, Any]] = None) -> MountFile

Context manager which yields a prepared instance of a docker volume.

Arguments:

  • template_name str - Name of the jinja template.
  • target_path str - Local file system path.
  • template_variables Optional[Dict[Any, Any]] - Jinja template variables.