Add a command to clean all datatracker related docker resources (from nick@staff.ietf.org)
- Legacy-Id: 19644
This commit is contained in:
parent
d7d28a56ad
commit
36bf80e9a5
|
@ -121,7 +121,7 @@ docker-compose down
|
|||
|
||||
to terminate the containers.
|
||||
|
||||
### Clean / Rebuild / Fetch Latest DB Image
|
||||
### Clean and Rebuild DB from latest image
|
||||
|
||||
To delete the active DB container, its volume and get the latest image / DB dump, simply run the following command:
|
||||
|
||||
|
@ -140,6 +140,24 @@ docker-compose pull db
|
|||
docker-compose build --no-cache db
|
||||
```
|
||||
|
||||
### Clean all
|
||||
|
||||
To delete all containers for this project, its associated images and purge any remaining dangling images, simply run the following command:
|
||||
|
||||
On Linux / macOS:
|
||||
|
||||
```sh
|
||||
cd docker
|
||||
cleanall
|
||||
```
|
||||
|
||||
On Windows:
|
||||
```sh
|
||||
cd docker
|
||||
docker-compose down -v --rmi all
|
||||
docker image prune
|
||||
```
|
||||
|
||||
### Accessing MariaDB Port
|
||||
|
||||
The port is exposed but not mapped to `3306` to avoid potential conflicts with the host. To get the mapped port, run the command *(from the project `/docker` directory)*:
|
||||
|
|
7
docker/cleanall
Executable file
7
docker/cleanall
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Shutting down any instance still running and purge images..."
|
||||
docker-compose down -v --rmi all
|
||||
echo "Purging dangling images..."
|
||||
docker image prune
|
||||
echo "Done!"
|
Loading…
Reference in a new issue