새소식

Dev Log

windows에서 docker volume을 mount할 때, postfix로 ;C가 붙는 현상

  • -

- 참고 : https://stackoverflow.com/questions/50608301/docker-mounted-volume-adds-c-to-end-of-windows-path-when-translating-from-linux

 

Docker mounted volume adds ;C to end of windows path when translating from linux style path

I've found some interesting weirdness when trying to mount a docker image on windows. I created a .sh script that does a mount of the project folder to run our developer environment image. I want ...

stackoverflow.com

docker run -d \
    --name ${__DOCKERNAME__} \
    -e TZ=Asia/Seoul \
    -v ${PWD}/src/${__DIR__}/${__TARGET__}:${__FULL_TARGET__} \
    -v ${PWD}/results/${__DOCKERNAME__}:${__WORKDIR__}/storage \
    presentj94/crawlee-${__RUNNER__} \
    src/${__DIR__}/${__TARGET__}/main.mjs

mac에서 짰던 도커 관련 스크립트를 윈도우에서 돌리는데, 자꾸 에러가 나서 봤더니

들어간 명칭 뒤에 ;C라는 이상한 게 더 붙어 있었다.

이유는 맨 위 참고 레퍼런스와 같이, Windows에서 pwd 인식 관련 문제였다!

해결법은 간단. pwd 앞에 /를 붙여준다.

docker run -d \
    --name ${__DOCKERNAME__} \
    -e TZ=Asia/Seoul \
    -v /${PWD}/src/${__DIR__}/${__TARGET__}:${__FULL_TARGET__} \
    -v /${PWD}/results/${__DOCKERNAME__}:${__WORKDIR__}/storage \
    presentj94/crawlee-${__RUNNER__} \
    src/${__DIR__}/${__TARGET__}/main.mjs
Contents

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

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