inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

초보를 위한 도커 안내서

nginx 실습 질문이요

245

임현민

작성한 질문수 2

1

/Users/imhyeonmin/index.html 파일을 만들었습니다. 그리고 다음 명령어를 입력했습니다.

docker run -d --rm \

-p 50000:80 \

-v $(/Users/imhyeonmin)/index.html:/usr/share/nginx/html/index.html \

Nginx

그러더니 

ad998364e67ff69914afc46365be9de56c6f448a0067794be1c4f2e192658ba1

docker: Error response from daemon: Mounts denied:

The path /index.html is not shared from the host and is not known to Docker.

You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.

See https://docs.docker.com/docker-for-mac for more info.

로그가 떠서 도커 환경설정에서 리소스 -> 파일 셰어링에서 /Users/imhyeonmin 을 추가했는데도 같은 에러 로그가 뜨네요...

그래서..명령어가 잘못되엇나 싶어서  다음 처럼 입력했더니

-v $(/Users/imhyeonmin/index.html):/usr/share/nginx/html/index.html \

/Users/imhyeonmin/index.html: line 3:

hello world

: command not found

b07cd2892e4799fc2d8daec9ad64fd50c359d75ae737f86ecba6b4358ce66c0a

커맨드 낫파운드가 뜨네요....뭘 잘못한건지 알려주세요..

docker

답변 1

1

subicura

안녕하세요!

입력하신 명령어에서 변수부분이 잘못된것 같습니다.

다음과 같이 변경하고 테스트해보시겠어요?

입력)

-v $(/Users/imhyeonmin/index.html):/usr/share/nginx/html/index.html

수정)

-v /Users/imhyeonmin/index.html:/usr/share/nginx/html/index.html

감사합니다!

실습코드

0

118

1

-v 옵션 후 workpress database 에러

0

127

1

Error establishing a database connection 질문 드립니다.

0

345

1

다중 컨테이너 실행 (APP)

0

190

1

ghost 실습 데이터베이스 에러

0

326

1

ghost 관리자 화면, 환경변수 url

0

231

1

ghost 실습 - 환경변수 url (2024)

0

243

1

hellonode 실습 질문있습니다.

0

194

1

docker-compose.yml 속성 문의

0

287

1

docker run 명령어중 /bin/sh 파라미터 문의

0

407

1

docker run -p 3000:3000 실행 시 오류

0

461

1

node app.js 실행 에러

0

327

1

Permission denied

0

682

1

result code build 시에 오류 있으신 분들

4

371

2

frontend, backend environment port 속성 관련 질문

0

375

1

app.js 실행 시 http 모듈 관련 이슈

0

346

1

방명록 배포과정중 질문이 있습니다.

0

309

1

Error establishing a database connection 에러 해결좀 해주세요

0

1411

1

docker 설치 오류

0

631

1

도커 기본 명령어 진행 중 막히는 부분

0

362

1

custom docker와 Base Image

0

250

1

안녕하세요 -d 옵션과 --rm 옵션에 대해서 질문을 하고자 합니다!

0

289

1

-v flag 에 질문있습니다

0

254

1

윈도우 파워쉘로 도커를 할라고하는데 컨테이너 만들기는 어떻게 해야되나요

0

788

1