Skip to content

Instantly share code, notes, and snippets.

@drexlma
Last active March 31, 2019 11:06
Show Gist options
  • Save drexlma/7e9d2680bd8d40d56301bb3d275955cb to your computer and use it in GitHub Desktop.
Save drexlma/7e9d2680bd8d40d56301bb3d275955cb to your computer and use it in GitHub Desktop.
OS-Upgrade for all Docker Container
for container in `docker ps -q`; do
docker inspect --format='{{.Name}}' $container;
docker exec -it $container date;
docker exec -it $container apt-get update;
docker exec -it $container apt-get upgrade;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment