New volume mount subpath - does not create sub directory if it doesn't ee #47842
Labels
area/volumes
kind/enhancement
Enhancements are not bugs or new features but can improve usability or performance.
version/26.0
Description
I am attempting to use the new feature for mounting subpath's of volumes - introduced here: #45687
I am using this with docker compose. I notice that if the directory doesn't already exist in the volume, rather than creating it, you get an error
This adds a lot of hassle now, as I need to consider how to provision these folders into the volume outside of the
docker compose up
experience.Reproduce
Use this compose.yml and
docker compose up
.Expected behavior
If directory indicated by subpath doesn't already exist within the volume, it is created.
docker version
Client: Cloud integration: v1.0.35+desktop.13 Version: 26.0.0 API version: 1.45 Go version: go1.21.8 Git commit: 2ae903e Built: Wed Mar 20 15:18:56 2024 OS/Arch: windows/amd64 Context: default Server: Docker Desktop 4.29.0 (145265) Engine: Version: 26.0.0 API version: 1.45 (minimum version 1.24) Go version: go1.21.8 Git commit: 8b79278 Built: Wed Mar 20 15:18:01 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: