Skip to content

Instantly share code, notes, and snippets.

@chasseurmic chasseurmic/
Created Jan 20, 2015

What would you like to do?
Clean shell script for Docker build process
echo Restarting boot2docker...
boot2docker down
boot2docker up
echo Exporting Docker variables...
$(boot2docker socket | awk 'NR==1') > /dev/null 2>&1
$(boot2docker socket | awk 'NR==2') > /dev/null 2>&1
$(boot2docker socket | awk 'NR==3') > /dev/null 2>&1
echo Removing orphaned images without tags...
docker images | grep "<none>" | awk '{print $3}' | xargs docker rmi
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.