Last active
July 24, 2020 11:22
-
-
Save residualmind/d9dc9a9f32b1bfad19fc1c06ddaff131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp_containers_running=$(mktemp) # make tempfile | |
echo $tmp_containers_running # print tempfile location | |
docker ps -q >$tmp_containers_running # save ids | |
# whatever you need to do, for instance: | |
sudo systemctl restart docker # restart docker | |
docker start $(<$tmp_containers_running) # restart containers from saved ids |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment