Docker for Windows – OCI runtime create failed エラー

dockerで共有ドライブを使用するコンテナを起動しようとすると以下のエラーが出て、起動できなかった時のメモ。
動作環境
- Windows10 Pro
- Windows PowerShell
- Docker for Windows version 2.0
エラーの内容
「docker-compose up -d」を実行すると以下のようなエラーが出て処理が進まない。
ERROR: for laravel_docker_web_1 Cannot start service web: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:424: container init caused ¥"rootfs_linux.go:58: mounting ¥¥¥"/host_mnt/c/programList/laravel_docker/docker/web/default.conf¥¥¥" to rootfs ¥¥¥"/var/lib/docker/overlay2/b6c59b7f6bb43345b65a570f72de3cdf276259eaa9f9659b3ed83c9583335c4b/merged¥¥¥" at ¥¥¥"/var/lib/docker/overlay2/b6c59b7f6bb43345b65a570f72de3cdf276259eaa9f9659b3ed83c9583335c4b/merged/etc/nginx/conf.d/default.conf¥¥¥" caused ¥¥¥"not a directory¥¥¥"¥"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: for web Cannot start service web: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:424: container init caused ¥"rootfs_linux.go:58: mounting ¥¥¥"/host_mnt/c/programList/laravel_docker/docker/web/default.conf¥¥¥" to rootfs ¥¥¥"/var/lib/docker/overlay2/b6c59b7f6bb43345b65a570f72de3cdf276259eaa9f9659b3ed83c9583335c4b/merged¥¥¥" at ¥¥¥"/var/lib/docker/overlay2/b6c59b7f6bb43345b65a570f72de3cdf276259eaa9f9659b3ed83c9583335c4b/merged/etc/nginx/conf.d/default.conf¥¥¥" caused ¥¥¥"not a directory¥¥¥"¥"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project.
「mountが出来ません。」と言われているみたい。設定してるはずなんだけど・・・
対応方法
もう一度、「Shared Drives」の設定をし直してみた。
1. Dockerの「Settings」を開く
2. 「Shared Drives」のタブを開く

3. ウィンドウ下部にある「Reset credentials」をクリック

4. 「Shared Drives」で共有したいドライブを再設定します

IDとパスワードの再入力を求められるので入力。
「Firewall detected」のメッセージが出たら、ファイアーウォールの設定を確認する。
5. 「Apply」をクリック
6. 「Reset」タブを開く

7. 「Restart Docker Desktop…」をクリック

取りあえず、このエラーは収まったみたい。Docker for Windowsではよくあるエラー?のようなのでまた出るかもしれない・・・。
ディスカッション
コメント一覧
まだ、コメントがありません