LoginSignup
16
6

More than 3 years have passed since last update.

【Docker】Error response from daemon: invalid mount config for type "bind": bind source path does not exist

Posted at

問題

$ docker compose up -d
[+] Running 0/2
 ⠋ Container 3e5dfe8d1909_docker-laravel-handson_app_1  R...                                                       0.1s
 ⠋ Container be3584c24dc2_docker-laravel-handson_web_1  R...                                                       0.1s
The new 'docker compose' command is currently experimental. To provide feedback or request new features please open issues at https://github.com/docker/compose-cli
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /host_mnt/Users/ucan/work/ucan-lab/docker-laravel-handson/backend

原因(?)

Docker Desktop のファイル共有の権限がなくてエラーになる場合があるようです。

Preferences... > Resources > FILE SHARING

ScreenShot 2021-04-29 22.16.42.png

今回は /Users 配下にあるディレクトリをマウントしようとしているので、問題ない気がします...🤔 /host_mnt を追加しないといけないのか...?

対処

Docker Desktop自体を一度終了させて、再度 docker compose up -d することでうまくいきました。

原因がハッキリしなくて気持ち悪いですが、そんなこともあるんですかね...🤔

参考

16
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
6