diff --git a/docker/nuke.sh b/docker/nuke.sh new file mode 100755 index 00000000000000..859f51eacfe6ca --- /dev/null +++ b/docker/nuke.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd $DIR + +# Tear down and clean up all DataHub-related containers, volumes, and network +docker-compose -p datahub down -v +docker-compose rm -f -v diff --git a/docs/debugging.md b/docs/debugging.md index 2053d0db2610d7..380031781b72f1 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -185,15 +185,7 @@ docker exec -i mysql sh -c 'exec mysql datahub -udatahub -pdatahub' < docker/mys ``` ## I've messed up my docker setup. How do I start from scratch? -1. Delete *all* docker containers, including ones that are created outside of the quickstart guide. +Run the following script to remove all the containers and volumes created during the quickstart tutorial. Note that you'll also lose all the data as a result. ``` -docker rm -f $(docker ps -aq) -``` -2. Drop all DataHub's docker volumes. -``` -docker volume rm -f $(docker volume ls -f name=datahub_ -q) -``` -3. Delete DataHub's network -``` -docker network rm datahub_network +./docker/nuke.sh ```