Implement Subpath Support for Volumes in Docker-Py (#3243)
Closes #3243
This PR aims to implement subpath support for volumes in Docker-Py, allowing users to specify a subpath when creating a volume or a container. This feature is essential for scenarios where a container needs to access a specific directory within a volume.
Added a subpath parameter to the create_volume method in docker/api/volume.py.
Updated the Volume model in docker/models/volumes.py to include a subpath attribute.
Modified the create_container method in docker/api/container.py to include the subpath parameter when creating a mount.
Updated the Mount class in docker/types/mounts.py to include a subpath attribute.
This implementation is based on the Docker API documentation and might require further testing and refinements. The subpath parameter is optional, and users can still create volumes and containers without specifying a subpath.
Hello, can this PR be merged ASAP?
@rayrapetyan Even, I'm also waiting for the review
@thaJeztah @krissetto, could you provide a review please, this seems like a very simple and straightforward change. Thanks!
@Khushiyant, could you re-trigger the build as seems one of the integration tests has failed before.
@Khushiyant, could you re-trigger the build as seems one of the integration tests has failed before.
Yeah, I triggered the build and now, all tests have passed
I have cleaned up the commit history while removing unnecessary changes and also corrected tests