-
Notifications
You must be signed in to change notification settings - Fork 4
/
remove-all-images.sh
36 lines (27 loc) · 985 Bytes
/
remove-all-images.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -eu
source use-common.sh
check_bash_version
check_gnu_grep_installed
check_gnu_sed_installed
check_yq_installed
check_git_docker_compose_commands_exist
git config apply.whitespace nowarn
git config core.filemode false
echo "[NOTICE] Substituting CRLF with LF to prevent possible CRLF errors..."
bash prevent-crlf.sh
git config apply.whitespace nowarn
git config core.filemode false
sleep 2
cache_non_dependent_global_vars
echo "[NOTICE] Delete all containers and networks related to the project. Ignore any error messages that may appear if the items do not exist."
docker rmi -f ${project_name}-nginx:latest
docker rmi -f ${project_name}-nginx:new
docker rmi -f ${project_name}-nginx:previous
docker rmi -f ${project_name}-nginx:previous2
docker rmi -f ${project_name}:latest
docker rmi -f ${project_name}:new
docker rmi -f ${project_name}:previous
docker rmi -f ${project_name}:previous2
docker rmi -f ${project_name}:blue
docker rmi -f ${project_name}:green