docker 1.12를 사용 중이다.

Docker version 1.12.0-rc4, build e4a0dbc, experimental



mac의 디렉토리를 docker의 리눅스 디렉토리로 복사할 때, 에러가 발생할 수 있다.


docker: Error response from daemon: Mounts denied:

are not shared from OS X and do not belong to the system.

You can configure shared paths from Docker -> Preferences...



이런 에러를 처리하는 방법을 소개한다.



맥에서 docker container로 복사할 때, 정해진 디렉토리만 복사할 수 있다.

/Users, /Volumes, /private, /tmp 이다. 





만약, 기본 디렉토리 외에 다른 디렉토리를 docker container로 복사하려고 할 때가 문제가 될 수 있다.



예) 실행 커맨드

docker run \
-v /mydev/google-sandbox/volume/data:/data \
-v /mydev/google-sandbox/volume/log:/log \
..


에러가 아래처럼 발생했다.



docker: Error response from daemon: Mounts denied:

RROR

The paths /mydev/google-sandbox/data and /mydev/google-spec/docker/google-sandbox/0/log

are not shared from OS X and do not belong to the system.

You can configure shared paths from Docker -> Preferences...

..



Docker 설정에 File sharing 디렉토리를 추가하면, 에러는 발생하지 않는다. 






Posted by '김용환'
,