13
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Docker on Windows ハマったポイント

13
Last updated at Posted at 2019-01-02

概要

以下の環境でDocker on Windows を使おうとしてハマった。
ハマったポイントをまとめておく。

  • Windows 10
  • Docker version 18.09.0, build 4d60db4
  • docker-compose version 1.23.2, build 1110ad01

ハマったポイント

指定されたファイルが見つかりません。

現象

docker-composeを実行したら「指定されたファイルが見つかりません。」というエラーが出た。

docker-compose実行
> docker-compose ps
ERROR: Windows named pipe error: 指定されたファイルが見つかりません。 (code: 2)

原因

  • Docker on Windows が起動していないことが直接の原因。
  • OS起動後のDocker起動はそこそこ遅いが、せっかち過ぎてDocker起動前にdocker-composeをたたいいてしまった。

OCI runtime create failed

現象

コンテナ作成時にOCI runtime create failedというエラーが出てコンテナ作成に失敗。

docker
> docker-compose up
Creating <container name>                  ... error
ERROR: for <container name>  Cannot start service <service name>: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"<path name>\\\" to rootfs \\\"/var/lib/docker/overlay2/b53bee70d9c0cec0a41a7486f0831becb8f94624b9f343af7881babe3b3251b2/merged\\\" at \\\"/var/lib/docker/overlay2/b53bee70d9c0cec0a41a7486f0831becb8f94624b9f343af7881babe3b3251b2/merged/<path name>\\\" caused \\\"no

原因

  • Docker on Windows の Shared Drivesのログイン情報が間違っていた。
  • ユーザ名を「コンピュータ名\ユーザ名」ではなく、「ユーザ名」とすべきだった。
  • 筆者の環境はMicrosoft アカウントだったが、ADアカウントかローカルアカウントだとまた違ってくるはず。
  • とにかくログイン情報の 設定する 際はなんのエラーもなく、 利用する ときに突如エラーになることに注意が必要。

参考サイト

13
10
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
13
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?