mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-12 18:47:45 +00:00
build(docker): add script to clean up docker environment (#2013)
Co-authored-by: Mars Lan <mars@trayminder.com>
This commit is contained in:
parent
ff7c7fc8e2
commit
36b79a3ef3
8
docker/nuke.sh
Executable file
8
docker/nuke.sh
Executable file
@ -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
|
||||||
@ -188,15 +188,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?
|
## 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)
|
./docker/nuke.sh
|
||||||
```
|
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user