본문 바로가기
도커

[Docker] mkdir /c: file existsEncountered errors while bringing up the project.

by YGY 2023. 11. 22.

1. Docker 실습중에 아래와 같은 에러가 떴다.

ERROR: for local-db-migrate  Cannot start service local-db-migrate: error while creating mount source path '/c/Users/Recorvery/Desktop/Workspace/dayonetest/db/flyway.conf': mkdir /c: file existsEncountered errors while bringing up the project.

2.해결방안

* Setting > Resources > File sharing > 원하는 디렉터리 추가

- 5일동안 삽질했다.. 구글링해보니 설정에가서 File sharing을해주라는데 window 버전에는 그게 안보였다..

 

- Setting > General > Use the WSL 2 based engine 체크해제 를 해주라고한다.

* 체크 푸는 부분이 비활성화 되있으면 Hyper-V 모드를 활성화시켜주어야한다. 바로 아래 "더보기" 참고.

더보기

* 모든  PowerShell 은 관리자 권한으로 키셔야합니다. 안그러면 오류남.

 

1. PowerShell 켜서 아래명령어 입력해서 다운받고 컴퓨터 재부팅

# Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

 

2. 마찬가지로  PowerShell 켜서 아래명령어 입력.

# DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

 

 3. Windows 기능 켜기/끄기 > Hyper-V 체크

 

- 삽질한이유는 이렇게하고 재부팅해도 안생겼다.. 

 

 

- 윈도우 아래 아이콘에서 Docker icon 우클릭 Switch to Windows containers 를 눌러서 바꿔주고

 다시 Switch to Linux containers를 누르니까 생성되었다.

 

- 이제 생성되었으면 원하는 디렉터리 권한 설정을 해주면 된다.

* 설정하고 다시 실행해보니 오류없이 잘 실행되었다!

'도커' 카테고리의 다른 글

[Docker] MongoDB 설치 후 실습  (1) 2023.11.22
[Docker] Tutorial #1  (0) 2023.11.20