Skip to content

Docker Desktop Windows 2.2.0.0 breaks "nested" volume mounting #5540

@jk12559

Description

@jk12559

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
  1. In the folder with docker-compose.yml file, run docker-compose up –d
  2. Run docker exec -it nested_mount_test /bin/bash
  3. Run cd /test and verify that there is a file called outer-file.txt and a folder called inner inside /test
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions