5
1

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.

git bashで docker -w /usr/src/projectが失敗

Last updated at Posted at 2018-02-11

git bashで、Docker run -vや -wが "working directory ... invalid"になる

$ docker run --rm -v /e/work/project:/usr/src/project -w /usr/src/project ruby:2.3.0 bundle init
CProgram Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: the working directory 'C:/Program Files/Git/usr/src/project' is invalid, it needs to be an absolute path
環境
Windows10 Enterprise
git bash
docker version : 17.12.0-ce, build c97c6d6

パスの前の / を重ねることで解決。

$ docker run --rm -v //e/work/project://usr/src/project -w //usr/src/project ruby:2.3.0 bundle init
Writing new Gemfile to /usr/src/project/Gemfile

参照

Problem with -v shared folders in 1.6

5
1
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
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?