-
Notifications
You must be signed in to change notification settings - Fork 303
Docker Desktop Windows 2.2.0.0 breaks "nested" volume mounting #5540
Copy link
Copy link
Closed
Description
Volumes mounted in a container which are inside a folder which is also a volume mount no longer have their content in the container. See the reproduction steps below for an example.
Steps to reproduce the behavior
Test Project Structure
- inner/
- inner-file.txt (empty dummy file)
- outer/
- outer-file.txt (empty dummy file)
- docker-compose.yml (see content)
docker-compose.yml
version: "3.7"
services:
centos:
container_name: nested_mount_test
image: centos
command: sleep 10m
volumes:
- ./outer:/test
- ./inner:/test/inner- In the folder with docker-compose.yml file, run docker-compose up –d
- Run docker exec -it nested_mount_test /bin/bash
- Run cd /test and verify that there is a file called outer-file.txt and a folder called inner inside /test
- Observe the content of /test/inner
Expected behavior
When observing the content of /test/inner, it should container inner-file.txt
Actual behavior
When observing the content of /test/inner, it is empty
Information
In Docker Desktop 2.1.0.4, this works as expected, but after upgrading to Docker Desktop 2.2.0.0, the volume mounted inside another volume has no content.
- Windows Version: Windows 10 Version 1809
- Docker Desktop Version: 2.2.0.0
- Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No
Reactions are currently unavailable