I've seen that the service watches all volumes in every container.
It would be great if there was a method to filter containers and volumes with labels.
For example, you could start the device-mapping-manager service only looking for services with the label enabled by passing some environment variable like: DMM_LABEL_ENABLE=true
Then, for a container to be watched, you could set the following labels:
labels:
com.allfro.device-mapping-manager.enable: 'true'
com.allfro.device-mapping-manager.regexp: '/dev/*' # Optional. If not defined, then all volumes
That way, DMM will look for those containers with the label enabled, and will use the regexp pattern to filter only those volumes (when available).
Some services that make use of this technique are:
I've seen that the service watches all volumes in every container.
It would be great if there was a method to filter containers and volumes with labels.
For example, you could start the device-mapping-manager service only looking for services with the label enabled by passing some environment variable like:
DMM_LABEL_ENABLE=true
Then, for a container to be watched, you could set the following labels:
That way, DMM will look for those containers with the label enabled, and will use the
regexp
pattern to filter only those volumes (when available).Some services that make use of this technique are: