Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clean-up script to start 'Dockerized' MEAN application, using Fig. (post: http://wp.me/p1RD28-1ja)
#!/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
You can’t perform that action at this time.