nginx 실습 질문이요
262
작성한 질문수 2
/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
커맨드 낫파운드가 뜨네요....뭘 잘못한건지 알려주세요..
답변 1
1
안녕하세요!
입력하신 명령어에서 변수부분이 잘못된것 같습니다.
다음과 같이 변경하고 테스트해보시겠어요?
입력)
-v $(/Users/imhyeonmin/index.html):/usr/share/nginx/html/index.html
수정)
-v /Users/imhyeonmin/index.html:/usr/share/nginx/html/index.html
감사합니다!
실습코드
0
147
1
-v 옵션 후 workpress database 에러
0
163
1
Error establishing a database connection 질문 드립니다.
0
397
1
다중 컨테이너 실행 (APP)
0
228
1
ghost 실습 데이터베이스 에러
0
380
1
ghost 관리자 화면, 환경변수 url
0
275
1
ghost 실습 - 환경변수 url (2024)
0
280
1
hellonode 실습 질문있습니다.
0
232
1
docker-compose.yml 속성 문의
0
326
1
docker run 명령어중 /bin/sh 파라미터 문의
0
455
1
docker run -p 3000:3000 실행 시 오류
0
507
1
node app.js 실행 에러
0
373
1
Permission denied
0
734
1
result code build 시에 오류 있으신 분들
4
410
2
frontend, backend environment port 속성 관련 질문
0
420
1
app.js 실행 시 http 모듈 관련 이슈
0
388
1
방명록 배포과정중 질문이 있습니다.
0
344
1
Error establishing a database connection 에러 해결좀 해주세요
0
1501
1
docker 설치 오류
0
675
1
도커 기본 명령어 진행 중 막히는 부분
0
410
1
custom docker와 Base Image
0
284
1
안녕하세요 -d 옵션과 --rm 옵션에 대해서 질문을 하고자 합니다!
0
338
1
-v flag 에 질문있습니다
0
296
1
윈도우 파워쉘로 도커를 할라고하는데 컨테이너 만들기는 어떻게 해야되나요
0
828
1





