sunetdrive/templates/multinode/get_containers

11 lines
192 B
Bash

#!/bin/bash
type=${1}
if [[ -z ${type} ]]; then
type="nextcloud-custom"
fi
for container in $(docker ps | grep ${type} | awk '{print $NF}' | grep -E -v '^$'); do
echo "${container}"
done