Например, отображать только те контейнеры, которые работают более 10 минут.
docker container ls -q --format '{{.Names}}' --filter status=running
Сначала вам нужно получить время создания контейнера, а затем сравнить его с текущей датой.
#!/bin/bash
# Date 1
container_date=$(docker inspect --format='{{.State.StartedAt}}' CONTAINER_NAME)
# Compute the seconds since epoch for date 1
t1=$(date --date = "$container_date" +%s)
# Date 2 : Current date
current_date=$(date +%Y-%m-%d\ %H:%M:%S)
# Compute the seconds since epoch for date 2
t2=$(date --date = "$current_date" +%s)
# Compute the difference in dates in seconds
let "tDiff=$t2-$t1"
# Compute the approximate hour difference
let "hDiff=$tDiff/3600"
echo "Approx hour diff b/w $container_date & $current_date= $hDiff"
ссылка связь