docker compose up で謎のエラーが起きた話

発生した事象

docker-compoes up を実行すると文字化けとインデントが崩れまくったエラーが発生。 
コンテナとイメージを削除した後再度 docker compose up を実行したところ、一度はうまくいったものの、その後実装に大き目の変更をしたところ再び同様のエラーが発生した。

環境など
- Windows 10 Pro バージョン 1909
- docker for windows 3.2

エラー全文は長いので最後の方に出します

## 対応

最終的にDocker を「プログラムの追加と削除」からアンインストール→最新版のDockerをインストールしたところ、
WSL2のインストールが完了していないからLinuxカーネルをインストールしてくださいと言われ、その指示に従った結果なおりました。  

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/268923/67a08349-ce34-42d9-2e98-832945b7e4de.png)

上記に至るまでに
- FileSharing の設定をクリア→再設定
- PC本体再起動
- docker prune
- dockerを最新版にアップデート
などなど試みました。  

発生したのは社用PCだったのですが、そちらは以前WSL2を設定しようとして、権限等の関係で途中でやめたという経緯があります。  
おそらくその時の作業が中途半端に終わったせいで発生したためにかなりまれな例だと思われます。  
ググっても同様の例にたどり着かなかったので絶望しました。  

```
Creating webcrew_nginx_1 ...
Creating webcrew_python_1 ...
Creating webcrew_nginx_1  ... error
Creating webcrew_python_1 ... error

ERROR: for webcrew_nginx_1  Cannot create container for service nginx: status code not OK but 500:  ☺   \ufffd\ufffd\ufffd\ufffd☺
  ♀☻   FDocker.Core, Version=3.3.0.62907, Culture=neutral, PublicKeyToken=null♣☺
                                                                                   ocker.Core.DockerException♀          ClassNameMessage♦DWatsonBuckets☺☺♥♥☺☺☺ ☺ ☺▲System.Collections.IDictionary►System.Excepti☻☻   ♠♥   ex☼ExceptionMethodHResult♠Source
                                                                                ocker.Core.DockerException♠♦   ▲Filesharing has been cancelled


♠♣   \ufffd¶   �ꏊ Docker.ApiServices.Mounting.FileSharing.<DoShareAsync>d__7.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docke
r\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:�s 0
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ Docker.ApiServices.Mounting.FileSharing.<ShareAsync>d__5.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docker\pinata\win\s
rc\Docker.ApiServices\Mounting\FileSharing.cs:�s 53
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ Docker.HttpApi.Controllers.FilesharingController.<ShareDirectory>d__2.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docker
\pinata\win\src\Docker.HttpApi\Controllers\FilesharingController.cs:�s 21
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
    ♠♠   \ufffd☺8
MoveNext
Docker.ApiServices, Version=3.3.0.62907, Culture=neutral, PublicKeyToken=null
Docker.ApiServices.Mounting.FileSharing+<DoShareAsync>d__7
Void MoveNext() §‼\ufffd♠   ↕Docker.ApiServices

ERROR: for webcrew_python_1  Cannot create container for service python: status code not OK but 500:  ☺   \ufffd\ufffd\ufffd\ufffd☺
    ♀☻   FDocker.Core, Version=3.3.0.62907, Culture=neutral, PublicKeyToken=null♣☺
                                                                                     ocker.Core.DockerException♀        ClassNameMessage♦DWatsonBuckets☺☺♥♥☺☺☺ ☺ ☺▲System.Collections.IDictionary►System.Excepti☻☻   ♠♥   ex☼ExceptionMethodHResult♠Source
                                                                                ocker.Core.DockerException♠♦   ▲Filesharing has been cancelled


♠♣   \ufffd¶   �ꏊ Docker.ApiServices.Mounting.FileSharing.<DoShareAsync>d__7.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docke
r\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:�s 0
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ Docker.ApiServices.Mounting.FileSharing.<ShareAsync>d__5.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docker\pinata\win\s
rc\Docker.ApiServices\Mounting\FileSharing.cs:�s 53
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ Docker.HttpApi.Controllers.FilesharingController.<ShareDirectory>d__2.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docker
\pinata\win\src\Docker.HttpApi\Controllers\FilesharingController.cs:�s 21
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
    ♠♠   \ufffd☺8
MoveNext
Docker.ApiServices, Version=3.3.0.62907, Culture=neutral, PublicKeyToken=null
Docker.ApiServices.Mounting.FileSharing+<DoShareAsync>d__7
Void MoveNext() §‼\ufffd♠   ↕Docker.ApiServices

ERROR: for nginx  Cannot create container for service nginx: status code not OK but 500:  ☺   \ufffd\ufffd\ufffd\ufffd☺       ♀☻   FDocker.Core, Version=3.3.0.62907, Culture=neutral, PublicKeyToken=null♣☺
                                                                     ocker.Core.DockerException♀        ClassNameMessage♦Data♫InnerExceptiWatsonBuckets☺☺♥♥☺☺☺ ☺ ☺▲System.Collections.IDictionary►System.Excepti☻☻   ♠♥   odHResult♠Source
                                                                                ocker.Core.DockerException♠♦   ▲Filesharing has been cancelled


♠♣   \ufffd¶   �ꏊ Docker.ApiServices.Mounting.FileSharing.<DoShareAsync>d__7.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docke
r\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:�s 0
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ Docker.ApiServices.Mounting.FileSharing.<ShareAsync>d__5.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docker\pinata\win\s
rc\Docker.ApiServices\Mounting\FileSharing.cs:�s 53
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ Docker.HttpApi.Controllers.FilesharingController.<ShareDirectory>d__2.MoveNext() �ꏊ C:\workspa\pinata\win\src\Docker.HttpApi\Con
trollers\FilesharingController.cs:�s 21
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
    ♠♠   \ufffd☺8
MoveNext
Docker.ApiServices, Version=3.3.0.62907, Culture=neutral, PublicKeyToken=null
Docker.ApiServices.Mounting.FileSharing+<DoShareAsync>d__7
Void MoveNext() §‼\ufffd♠   ↕Docker.ApiServices

ERROR: for python  Cannot create container for service python: status code not OK but 500:  ☺   \ufffd\ufffd\ufffd\ufffd☺       ♀☻   FDocker.Core, Version=3.3.0.62907, Culture=neutral, PublicKeyToken=null♣☺
                                                                       ocker.Core.DockerException♀      ClassNameMessage♦Data♫InnerExceptiWatsonBuckets☺☺♥♥☺☺☺ ☺ ☺▲System.Collections.IDictionary►System.Excepti☻☻   ♠♥   odHResult♠Source
                                                                                ocker.Core.DockerException♠♦   ▲Filesharing has been cancelled


♠♣   \ufffd¶   �ꏊ Docker.ApiServices.Mounting.FileSharing.<DoShareAsync>d__7.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docke
r\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:�s 0
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ Docker.ApiServices.Mounting.FileSharing.<ShareAsync>d__5.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docker\pinata\win\s
rc\Docker.ApiServices\Mounting\FileSharing.cs:�s 53
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ Docker.HttpApi.Controllers.FilesharingController.<ShareDirectory>d__2.MoveNext() �ꏊ C:\workspaces\PR-15595\src\github.com\docker
\pinata\win\src\Docker.HttpApi\Controllers\FilesharingController.cs:�s 21
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- ���O�ɗ�O���X���[���ꂽ�ꏊ����̃X�^�b�N �g���[�X�̏I��� ---
   �ꏊ System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   �ꏊ System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   �ꏊ System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
    ♠♠   \ufffd☺8
MoveNext
Docker.ApiServices, Version=3.3.0.62907, Culture=neutral, PublicKeyToken=null
Docker.ApiServices.Mounting.FileSharing+<DoShareAsync>d__7
Void MoveNext() §‼\ufffd♠   ↕Docker.ApiServices
Encountered errors while bringing up the project.
```