Docker Hacks

2016-07-18

I’ve found this snippet handy when you need to restart the docker daemon and want to resume currently running containers.

1
2
3
4
docker ps |tail -n +2 > /docker.running
cat /docker.running
service docker restart
docker start $(awk '{print $1}' /docker.running)

Comments: