mkdir -p /hunt/db
git clone https://github.com/hiyali/node-mongodb-dockerize.git
docker build -q -t hunt_crawler:v1 crawler-docker/ # remove -q with outputsdocker run -d --restart always -v /hunt/db:/hunt/db:rw --add-host localhost:172.17.0.2 -p 5555:5555 -p 5556:80 --name crawler_container hunt_crawler:v1 /bin/bash -c "/hunt/run.sh"docker run -i -t -v /hunt/db:/hunt/db:rw --add-host localhost:172.17.0.2 -p 5555:5555 -p 5556:80 --name crawler_runner_1 hunt_crawler:v1 /bin/bash
./run.shsystemctl start docker
docker start crawler_runner_1
docker attach crawler_runner_1To stop a container, use CTRL-c. This key sequence sends SIGKILL to the container. If --sig-proxy is true (the default),CTRL-c sends a SIGINT to the container. You can detach from a container and leave it running using the CTRL-p CTRL-q key sequence
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)docker images
docker rmi <image id> # remove a image
docker rmi $(docker images | grep "^<none>" | awk -F ' ' '{print $3}') # remove all none named images
docker rmi $(docker images -q) # remove all imagesdocker cp <containerId>:/file/path/within/container /host/path/target