install docker:
- list the containers: docker ps
- list all the containers: docker ps -a
- list the images: docker images
- change another image name: docker tag name1 name2
- commit the change to image: docker commit id name
- delete the image: docker rmi name
- stop a container: docker stop name
- remove a container: docker rm name
docker exec -it Name /bin/bash
docker save image_name > Name.tar
docker run --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864
--cap-add SYS_PTRACE --rm --gpus all --pid=host --net=host
--security-opt apparmor:unconfined -e DISPLAY=$DISPLAY
-v /home/temp:/workspace -v /home/pipeline:/data/pipeline
-w /data/pipeline_capture -it Name
9. docker compose:
start all the images:
docker-compose up -d
docker-compose up -d --build
docker-compose -f docker-compose-local.yml -d --build
(use a specific docker compose file)
stop all the images:
docker compose down
10. docker storage analysis:
docker system df
11. docker clear storage:
clean all:
docker system prune
clean cache:
docker builder prune
clean volume:
docker volume prune
clean container:
docker container prune
12. docker logs:
if i only want to check the last 100 lines of logs since a certain time:
docker logs -f -t [--since="2018-02-08"] --tail=100 CONTAINER_ID
-f: 跟踪实时日志
-t: 显示时间戳
if i only want to check the latest 30min of logs:
docker logs --since 30m CONTAINER_ID