Skip to content

Commit 36bf80e

Browse files
committed
Add a command to clean all datatracker related docker resources (from nick@staff.ietf.org)
- Legacy-Id: 19644
1 parent d7d28a5 commit 36bf80e

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

docker/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ docker-compose down
121121
122122
to terminate the containers.
123123
124-
### Clean / Rebuild / Fetch Latest DB Image
124+
### Clean and Rebuild DB from latest image
125125
126126
To delete the active DB container, its volume and get the latest image / DB dump, simply run the following command:
127127
@@ -140,6 +140,24 @@ docker-compose pull db
140140
docker-compose build --no-cache db
141141
```
142142
143+
### Clean all
144+
145+
To delete all containers for this project, its associated images and purge any remaining dangling images, simply run the following command:
146+
147+
On Linux / macOS:
148+
149+
```sh
150+
cd docker
151+
cleanall
152+
```
153+
154+
On Windows:
155+
```sh
156+
cd docker
157+
docker-compose down -v --rmi all
158+
docker image prune
159+
```
160+
143161
### Accessing MariaDB Port
144162
145163
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)*:

docker/cleanall

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
echo "Shutting down any instance still running and purge images..."
4+
docker-compose down -v --rmi all
5+
echo "Purging dangling images..."
6+
docker image prune
7+
echo "Done!"

0 commit comments

Comments
 (0)