mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Added docker directory and scripts for resetting Docker
This commit is contained in:
3
docker/README.md
Normal file
3
docker/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Docker Scripts
|
||||
|
||||
Use the scripts in this directory to execute tasks in Docker. Please note that these scripts are intended to be executed from this app's root directory.
|
||||
24
docker/nuke
Executable file
24
docker/nuke
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script destroys all Docker containers and images.
|
||||
# SOURCE: https://gist.github.com/JeffBelback/5687bb02f3618965ca8f
|
||||
|
||||
docker/nukec
|
||||
|
||||
echo '--------------------------------------'
|
||||
echo 'Killing and removing all Docker images'
|
||||
for i in $(docker images -a -q)
|
||||
do
|
||||
docker kill $i; wait;
|
||||
docker rmi -f $i; wait;
|
||||
done;
|
||||
|
||||
echo '------------'
|
||||
echo 'docker ps -a'
|
||||
docker ps -a
|
||||
|
||||
echo '----------------'
|
||||
echo 'docker images -a'
|
||||
docker images -a
|
||||
|
||||
wait
|
||||
19
docker/nukec
Executable file
19
docker/nukec
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script destroys all Docker containers and networks but leaves the Docker images alone.
|
||||
|
||||
echo '-----------------------'
|
||||
echo 'docker network prune -f'
|
||||
docker network prune -f
|
||||
|
||||
echo '------------------------------------------'
|
||||
echo 'Killing and removing all Docker containers'
|
||||
for i in $(docker ps -a -q)
|
||||
do
|
||||
docker kill $i; wait;
|
||||
docker rm -f $i; wait;
|
||||
done;
|
||||
|
||||
echo '------------'
|
||||
echo 'docker ps -a'
|
||||
docker ps -a
|
||||
Reference in New Issue
Block a user