inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

초보를 위한 도커 안내서

nginx 실습 관련 질문드립니다.

583

jjae

작성한 질문수 9

1

nginx 실습 시 

localhost:50000 으로 요청하면 작성한 index.html이 아닌 nginx 본 메인페이지가 뜨고

명령프롬프트 창에는 다음과 같이 나옵니다

Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/Users/multicampus/docker_lab/wp/index.html" to rootfs at "/usr/share/nginx/html/index.html" caused: mount through procfd: 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

답변 1

1

subicura

안녕하세요!

에러 메시지로 보아 파일을 디렉토리로 연결했거나, 디렉토리를 파일로 연결한 것으로 보입니다.

/Users/multicampus/docker_lab/wp/index.html 해당 위치에 파일이 정확하게 있는지 다시 확인해보시고 docker 실행명령어를 알려주시겠어요?

감사합니다!

0

jjae

안녕하세요.

로컬의 index.html 을 브라우저로 실행 시 주소 창에는

file:///C:/Users/multicampus/docker_lab/wp/index.html

이렇게 나오고,

명령어는 다음과 같습니다.

docker run -d --rm -p 50000:80 -v /Users/multicampus/docker_lab/wp/index.html:/usr/share/nginx/html/index.html nginx

0

subicura

안녕하세요!

windows의 사용중이시라면 다음과 같이 "c:/"를 붙여보시겠어요?

docker run -d --rm -p 50000:80 -v c:/Users/multicampus/docker_lab/wp/index.html:/usr/share/nginx/html/index.html nginx

그리고 도커 데스크톱 설정중에 공유 폴더가 체크되어 있는지도 확인 부탁드립니다.

감사합니다!

0

jjae

정상적으로 동작합니다! 감사합니다.

실습코드

0

117

1

-v 옵션 후 workpress database 에러

0

126

1

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

0

345

1

다중 컨테이너 실행 (APP)

0

189

1

ghost 실습 데이터베이스 에러

0

326

1

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

0

231

1

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

0

242

1

hellonode 실습 질문있습니다.

0

192

1

docker-compose.yml 속성 문의

0

287

1

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

0

406

1

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

0

461

1

node app.js 실행 에러

0

326

1

Permission denied

0

681

1

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

4

370

2

frontend, backend environment port 속성 관련 질문

0

374

1

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

0

345

1

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

0

309

1

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

0

1410

1

docker 설치 오류

0

631

1

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

0

362

1

custom docker와 Base Image

0

250

1

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

0

288

1

-v flag 에 질문있습니다

0

254

1

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

0

785

1