forked from DefectDojo/django-DefectDojo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc-down.sh
executable file
·21 lines (19 loc) · 884 Bytes
/
dc-down.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
bash ./docker/docker-compose-check.sh
if [[ $? -eq 1 ]]; then exit 1; fi
if [ $# -eq 0 ]
then
echo "Stopping docker compose and removing containers"
# Compose V2 integrates compose functions into the Docker platform,
# continuing to support most of the previous docker-compose features
# and flags. You can run Compose V2 by replacing the hyphen (-) with
# a space, using docker compose, instead of docker-compose.
docker compose down
else
echo "Stopping docker compose and removing containers with additional parameter $1 ..."
# Compose V2 integrates compose functions into the Docker platform,
# continuing to support most of the previous docker-compose features
# and flags. You can run Compose V2 by replacing the hyphen (-) with
# a space, using docker compose, instead of docker-compose.
docker compose down "$1"
fi