17
8

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.

PowerShellからDocker for Windowsの-vにpwdを指定する時の注意点

Posted at

はじめに

$(pwd)${pwd}で少しだけハマったのでまとめておく。

指定例 結果 備考
-v $(pwd):/foo/bar NG "invalid reference format."になる
-v "$(pwd):/foo/bar" OK
-v ${pwd}:foo/var OK
-v "${pwd}:/foo/bar" OK
  • $(pwd)はダブルクォートで囲む必要がある
  • ${pwd}ならどちらでも大丈夫

PS: 念の為ですがシングルクォートは、そのまま文字列とみなされてしまうのでNGです。

17
8
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
17
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?