メンチカツには醤油でしょ!!

AWS/Java/Node.js/Spreadsheets/Docker/Jenkins/コミュニティ・勉強会レポを主とした技術系ブログ

Docker for WindowsでC: drive is not shared. Please share it in Docker for Windows Settings.

Docker for WindowsではCドライブを共有

エラーメッセージの通りなんですが、Docker for WindowsではCドライブのshareが必要になることがあります。

私はdocker-compose upした時に出ました。
多分ですがvolumes指定があったからでしょう。
コマンドラインオプションでも-vがあれば出ると思います。

>docker-compose up -d
...
ERROR: for apache-php Cannot create container for service apache-php: C: drive is not shared. Please share it in Docker for Windows Settings. ERROR: Encountered errors while bringing up the project.

Please share it in Docker for Windows Settingsなので
タスクトレイのDockerアイコンを右クリック⇒Settings...

f:id:ryoichi0102:20161221150549j:plain

サイドメニュー Shared DrivesよりC DriveをSharedにします。

f:id:ryoichi0102:20161221151431j:plain

OSのパスワードを聞かれるので入力

f:id:ryoichi0102:20161221151439j:plain

ディレクトリ指定したいなぁ。