새소식

🍪 Study/Docker 도커

[Error] The path {path} is not shared from the host and is not known to Docker.

  • -
728x90
Error response from daemon: Mounts denied: The path /mnt/ssd2/docker-test/db/conf.d is not shared from the host and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.

 

이 에러는 docker desktop을 통해 아주 간단하게 해결할 수 있다.

 

1. docker desktop 우측 상단의 톱니바퀴 아이콘을 눌러 설정(Setting)으로 이동한다.

2. 목록에서 Resources > File sharing을 눌러 이동한다.

3. Virtual file shares에 공유를 원하는 디렉토리 주소를 입력하고 +를 눌러 추가한다.

4. 추가 후, 하단의 Apply & restart 버튼이 활성화되면 이 버튼을 눌러 적용한다.

 

4번까지 실행한 후, docker desktop 모습

 

5. docker compose up을 다시 실행하면, 정상적으로 작동한다!

728x90
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.