Listing the contents of a directory in a shared volume with 200K files from within a ubuntu container hosted in windows gets stuck

此生再无相见时 提交于 2020-04-07 08:23:12

问题


Problem

Listing the contents of a directory in a shared volume with 200K files from within a ubuntu container hosted in windows gets stuck.

How to reproduce

  1. Install Docker Desktop 2.2.0.3 (42716) stable on Windows 10
  2. Configure docker to work in WSL (Ubuntu 16 distribution)
    • Expose daemon on tcp://localhost:2375 without TLS
    • In WSL, define environment variable DOCKER_HOST=localhost:2375
    • In WSL, in /etc/wsl.conf in the [automount] section, define root = /
  3. Create a folder on the Windows host that contains 200,000 files (even small ones). e.g. c:/temp
  4. Run a docker container, mapping c:/temp on the host to /opt in the container as follows: docker run -it -v /c/temp:/opt ubuntu bash
  5. In the bash prompt of the container run cd /opt and then ls

Expected Result

The ls command will start to list all files in the c:/temp folder.
This can be expected to take some time, but it will begin almost immediately.

Actual Result

Nothing is printed and the shell does not respond.
Moreover, CTR C does not interrupt the ls command.
The only way I found to stop the container is to restart Docker Desktop

来源:https://stackoverflow.com/questions/60677656/listing-the-contents-of-a-directory-in-a-shared-volume-with-200k-files-from-with

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!