Last active
October 31, 2015 19:55
-
-
Save garystafford/0c8edbfb6655e6e16ae9 to your computer and use it in GitHub Desktop.
Clean-up script to start 'Dockerized' MEAN application, using Fig. (post: http://wp.me/p1RD28-1ja)
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
#!/bin/sh | |
# Clean-up / start-up script for Docker/Fig and MEAN app | |
# Gary A. Stafford | |
# https://github.com/garystafford | |
# remove all exited containers | |
echo "Removing all 'Exited' containers..." | |
docker rm -f $(docker ps --filter 'status=Exited' -a) > /dev/null 2>&1 | |
# remove all <none> images | |
echo "Removing all untagged (<none>) images..." | |
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") > /dev/null 2>&1 | |
# build and start containers with fig | |
fig build && fig up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment