Created
April 11, 2017 18:06
-
-
Save smunilla/b9453c27069efe97e5ddf5c2082ea6a7 to your computer and use it in GitHub Desktop.
Interesting Docker Cleanup Things
This file contains hidden or 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
#!/bin/bash | |
THREEWEEKSAGO="$(date --date="3 Weeks Ago")" | |
NOW="$(date)" | |
echo "${THREEWEEKSAGO}" | |
echo "${NOW}" | |
if [ $NOW -gt $THREEWEEKSAGO ]; then | |
echo "Yes" | |
fi | |
docker images --all --format "{{ .ID }} {{ .CreatedAt }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment