docker build -t stock_data_repo_instance24 .
docker run -v /opt/log:/opt/log -d -it stock_data_repo_instance24
docker build -t web_instance1 .
docker run -v /opt/log:/opt/log -p 192.168.3.37:80:3000 -d -it web_instance1
docker run -v /opt/log:/opt/log -p 192.168.3.37:4242:4242 -d -it factor_data_repo_instance2
docker run -v /opt/log:/opt/log -p 192.168.3.37:4243:4243 -d -it strategy_data_repo_instance1
进入Bash
docker exec -it <container name> /bin/bash
运行Bash命令
docker exec -it <container name> <command>
清理Docker
docker system df
docker system prune -a
删除不使用的container
docker rm $(docker ps -q -f status=exited)
# Remove unused images
docker image prune
# Remove stopped containers.
docker container prune
# Remove unused volumes
docker volume prune
# Remove unused networks
docker network prune
# Command to run all prunes:
docker system prune