.. _object_DockerVolume: :index:`DockerVolume` --------------------- Description *********** The DockerVolume object defines a Docker volume used to provide persistent storage to Docker containers. Most functionalities and modes are supported through the :ref:`DockerObject.driver ` and :ref:`DockerObject.options ` properties. See the `official Docker documentation `_ for more information on how to use Docker volumes. :**› Inherits**: :ref:`DockerObject ` Overview ******** Properties ++++++++++ .. hlist:: :columns: 2 * :ref:`destination ` * :ref:`readOnly ` * :ref:`DockerObject.driver ` * :ref:`DockerObject.error ` * :ref:`DockerObject.errorString ` * :ref:`DockerObject.name ` * :ref:`DockerObject.options ` * :ref:`Object.objectId ` * :ref:`Object.parent ` Methods +++++++ .. hlist:: :columns: 1 * :ref:`DockerObject.create() ` * :ref:`DockerObject.remove() ` * :ref:`Object.deserializeProperties() ` * :ref:`Object.fromJson() ` * :ref:`Object.serializeProperties() ` * :ref:`Object.toJson() ` Signals +++++++ .. hlist:: :columns: 1 * :ref:`DockerObject.errorOccurred() ` * :ref:`Object.completed() ` Enumerations ++++++++++++ .. hlist:: :columns: 1 * :ref:`DockerObject.Error ` Properties ********** .. _property_DockerVolume_destination: .. _signal_DockerVolume_destinationChanged: .. index:: single: destination destination +++++++++++ This property holds the destination path where the volume is mounted in the container. :**› Type**: String :**› Signal**: destinationChanged() :**› Attributes**: Writable .. _property_DockerVolume_readOnly: .. _signal_DockerVolume_readOnlyChanged: .. index:: single: readOnly readOnly ++++++++ This property holds whether this volume should be provided read-only for the container. Read-only volumes can be used to provide configuration files and other static data. :**› Type**: Boolean :**› Default**: ``false`` :**› Signal**: readOnlyChanged() :**› Attributes**: Writable .. _example_DockerVolume: Example ******* .. code-block:: qml import InCore.Foundation 2.5 Application { DockerService { DockerContainer { name: "docker-postgresql-example" image: "arm32v7/postgres:alpine" volumes: [ DockerVolume { name: "postgresdata"; destination: "/var/lib/postgresql/data" } ] } DockerContainer { name: "docker-nodered-example" image: "nodered/node-red:latest-minimal" ports: [ "1880:1880" ] volumes: [ DockerVolume { name: "nodereddata"; destination: "/data" } ] } } }