Instantly share code, notes, and snippets.

View update_docker_images.sh
docker ps -aq > docker_ids.txt
while read CONTAINER
do
docker inspect ${CONTAINER} |grep -v sha |grep Image |awk '{print $2}' |tr -d '",'
done < docker_ids.txt > docker_images.txt
while read IMAGE
do
docker pull ${IMAGE}
View Determine_OS.sh
#!/bin/sh
#
# Determine OS
# Detects which OS and, if it is Linux, it will detect which Linux distribution.
# The result is then echoed to the shell.
OS=$(uname -s)
REV=$(uname -r)
MACH=$(uname -m)