Skip to content

Latest commit

 

History

History
82 lines (52 loc) · 1.38 KB

USAGES.md

File metadata and controls

82 lines (52 loc) · 1.38 KB

USAGES

[ main readme로 이동 ]

#build (nodejs를 설치하지 않은 경우)

: nodejs를 설치하지 않은 경우, docker/dev의 이미지를 활용해, 컨테이너 안에서 작업합니다.

docker build -t presentj94/nodejs -f ./docker/dev/Dockerfile ./docker/dev
bash scripts/opencontainer.sh
npm run build

#build runner (nodejs를 설치한 경우)

npm run build-

#build에 실패한 이미지가 있는 경우

: <None/None> docker image가 쌓이면, 상당히 많은 용량을 차지할 수 있음.

npm run prune-image

expected result

> [email protected] prune-image /$SOMEDIR/crawlee-ing-on-container
> docker rmi $(docker images -f "dangling=true" -q)

Deleted: sha256:3c7dca9ad47f1e1d534808ad6077661a2f81c1d97df590f85e53805405ade000

#runner 실행 -> DIR/INDEX (has main.js)

npm run crawling -- --runner ${RUNNER} --dir ${DIR} --index ${INDEX}

example

npm run crawling -- --runner job dir tutorial --index 02

#runner 컨테이너 삭제 + 관련 결과 삭제 (전체)

npm run clean -- --runner ${RUNNER} --dir ${DIR} --index ${INDEX}

example

npm run clean -- --runner job dir tutorial --index 02

#nodejs 컨테이너로 접속 (temporary)

npm run open