2
0
mirror of https://github.com/edouardparis/lntop synced 2024-11-06 03:20:21 +00:00
lntop/docker/clean.sh
Antonin Hildebrand 9e50120dec docker: drop docker-compose dependency
Instead of relying on docker-compose.yml, we use bash to pass
configuration to docker directly via commnad-line args.

We also use config template and prior each run we evaluate it
with current environment. So that settings like LND_GRPC_HOST
can be specified prior each run without a need to rebuild.
2019-04-28 20:05:13 +02:00

17 lines
399 B
Bash
Executable File

#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE[0]}")"
. _settings.sh
# stop and remove all containers from lntop image (see https://stackoverflow.com/a/32074098/84283)
CONTAINERS=$(docker ps -a -q --filter ancestor=lntop --format="{{.ID}}")
if [[ -n "$CONTAINERS" ]]; then
docker rm $(docker stop ${CONTAINERS})
fi
# clean source code stage
rm -rf lntop/_src
# clean volumes
rm -rf _volumes