질문&답변
docker volume 설정 시 mount 에러
말씀하신대로 진행해 보려 했으나 실패했습니다. ;;; 우선 해본 것은 제가 E 드라이브에서 공부를 하고 있으므로 Docker의 image파일 경로를 E로 변경했습니다. 그리고 file-sharing을 해보려고 했는데 메뉴가 없습니다. 그래서 좌측에 있는 메뉴 Volumes에 들어가서 설정해보려고 했으나 설정할 때 이름을 적는것 외에는 다른 설정이 없습니다. 이미지에 보이는 Volume은 제가 docker-compose up 실행 시 자동으로 생겼습니다. 여전히 에러는 발생하고 있는데요 ==================================================================== [+] Running 1/0 ✔ Container backend-my-database-1 Running 0.0s Attaching to backend-my-backend-1, backend-my-database-1 Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/run/desktop/mnt/host/e/Study-App/codecamp-backend/class/section04/04-07-docker-compose-with-mongoose-board2/backend/index.js" to rootfs at "/myfolder/index.js": mount /run/desktop/mnt/host/e/Study-App/codecamp-backend/class/section04/04-07-docker-compose-with-mongoose-board2/backend/index.js:/myfolder/index.js (via /proc/self/fd/9), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ==================================================================== 그리고 구글에서 찾은 어떤 내용에 docker run -v 호스트경로:docker경로 로 작성하면 된다고 해서 compose up시 실행해봤으나 docker-compose up에서는 unknown shortand flag로 에러가 났습니다. 그 외에는 아직 적절한 방법을 찾지 못하고 있습니다;;; 뭔가 좋은 방법이 없을까요?
- 좋아요수
- 0
- 댓글수
- 3
- 조회수
- 3568





