yisi
@yisi3412
Reviews Written
-
Average Rating
-
Posts
Q&A
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-1Error 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
- 3.5K
Q&A
docker volume ์ค์ ์ mount ์๋ฌ
๋ง์ํ์ 3๊ฐ์ ์๋ฌํ๋ฉด ์ ๋๋ค.(์ฌ์ง) (์ฌ์ง) (์ฌ์ง)PS E:\Study-App\codecamp-backend\class\section04\04-07-docker-compose-with-mongoose-board2\backend> docker-compose up[+] Running 2/2 โ Container backend-my-backend-1 Created 0.6s โ Container backend-my-database-1 Created 0.0s Attaching to backend-my-backend-1, backend-my-database-1Error 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/email.js" to rootfs at "/myfolder/email.js": mount /run/desktop/mnt/host/e/Study-App/codecamp-backend/class/section04/04-07-docker-compose-with-mongoose-board2/backend/email.js:/myfolder/email.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 typePS E:\Study-App\codecamp-backend\class\section04\04-07-docker-compose-with-mongoose-board2\backend> ๊ทธ๋ฆฌ๊ณ package.json์ ํ์๋ก ํ๋ ๋ช ๋ น์ด๋ RUN yarn install๊ณผCMD yarn start:dev ์ธ๋ฐ์.RUN yarn install์ ์ฃผ์ ์ฒ๋ฆฌํ๊ณ ์๋ํด๋ดค๋๋ฐ ๋์ผํ ์๋ฌ๊ฐ ๋ฐ์ํ๊ณ ,CMD yarn start:dev๋ ์๋ฒ ์คํ ๋ช ๋ น์ด๋ผ.... ์๋ํด ๋ณด์ง ์์์ต๋๋ค.
- 0
- 3
- 3.5K
Q&A
docker-compose์ image ์ต์ ์ฌ์ฉ์ docker๊ฐ 1๊ฐ๋ง ๋ง๋ค์ด์ง๋๋ค.
์... docker-compose up์ ํด๋ณด๊ณ ๋์์ผ ์ดํดํ์ต๋๋ค. docker image๋ฅผ ๋ง๋ค์ง ์๊ณ ์คํํ๋ ๊ทธ ๋ mongo:5๋ฅผ ๋ค์ด ๋ฐ์์ docker image๊ฐ ์์ฑ๋๋ค์..์ง๋ฌธ์ ๋ํด ์ญ์ ํ๋ ๊ธฐ๋ฅ์ด ์์ด ์ง๋ฌธ์ ์ญ์ ํ์ง ๋ชปํ์ต๋๋ค.
- 0
- 1
- 477




