The Developer's Guide to CI/CD FAQ

Batch start Exited docker container

1
docker start $(docker ps -a | awk '{ print $1}' | tail -n +2)

Device or resource busy

1
cat /proc/mounts | grep "mapper/docker" | awk '{print $2}' | xargs umount

kill defunct process

1
ps -ef | grep defunct | grep -v grep | awk '{print $2}' | xargs kill -9

remove exist container

1
docker ps -a | grep table-sandbox | awk '{print $1}' | xargs docker stop | xargs docker rm

docker log

1
docker logs --tail 50 --follow --timestamps container_name
咕咕咕