The volume mounted into a docker container is empty on Windows 10. I fixed the issue by reset credentials by using Kitematic.
Error condition:
Solutions:
Maybe because my windows password have been changed several months ago.
1. Click the docker icon on lower right corner of desktop. And click the "Settings".
2. Switch to the label: Shared Drives
3. Click "Reset Credentials" on lower center region.
4. Enable which drive you want to shared. And click the "Apply".
5. Enter the Windows account and password
Other error message:
Versions:
Docker Version 18.06.1-ce-win73 (19507)
Other trivial approaches:
Materials:
Docker Icons - Free Download, PNG and SVG (Thanks, icons8!)
Error condition:
docker run --rm -v /d/temp:/data centos:centos7 ls -lht /dataThe above command returns
total 0which means /data on container is an empty folder. But the host folder d:/temp is not empty folder on Windows 10.
Solutions:
Maybe because my windows password have been changed several months ago.
1. Click the docker icon on lower right corner of desktop. And click the "Settings".
2. Switch to the label: Shared Drives
3. Click "Reset Credentials" on lower center region.
4. Enable which drive you want to shared. And click the "Apply".
5. Enter the Windows account and password
Other error message:
docker: Error response from daemon: error while creating mount source path '/host_mnt/d/temp': mkdir /host_mnt/d: file exists.
Versions:
Docker Version 18.06.1-ce-win73 (19507)
Other trivial approaches:
- Run the command line as Administrator.
- Run the Docker as Administrator.
- Grant more permission for the account: User on the shared host folder.
- Volume mounts do not work on windows 10 · Issue #77 · docker/for-win
- Shared drives
- Use volumes | Docker Documentation
- 為Docker附加硬碟 · Docker學習筆記
- 前言 · 《Docker —— 從入門到實踐》正體中文版
Materials:
Docker Icons - Free Download, PNG and SVG (Thanks, icons8!)
留言
張貼留言