Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(docker): add script to clean up docker environment #2013

Merged
merged 6 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docker/nuke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# Tear down and clean up all DataHub-related containers, volumes, and network
docker-compose -p datahub down -v
docker system prune -a -f
12 changes: 2 additions & 10 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```