볼륨, 당신은, 그래서 당신이 볼륨 아래와 같이 "B"폴더에 복사 할 데이터를 가지고 있는지 확인해야합니다 장착 그것은 테스트/컨테이너에서 사용할 수 있습니다.
다음은 작성 파일입니다.
version: '2'
services:
service-name:
image: image-name:latest
ports:
- 4000:4000
- 5858:5858
volumes:
- /c/Users/a/b:/usr/src/test/
사용 Dockerfile에서 COPY 명령, 당신은 컨테이너에 볼륨을 마운트 할 필요가 없도록.
Dockerfile는 아래 어떻게 현재 디렉토리
FROM node:boron
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json .
# For [email protected] or later, copy package-lock.json as well
# COPY package.json package-lock.json ./
RUN npm install
# First .(DOT) referes to current folder where the docker is, and second .(DOT) referes to teh folder where you want to copy
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
를 복사하여 간단한 노드 응용 프로그램을 실행 설명