[fix] Use v2 of Docker http api

Docker no longer exposes the default api path, so we need to use /v2 in our api call
This commit is contained in:
William Wernert
2020-03-26 18:47:37 -04:00
parent 05690691f5
commit 7709bfd28e

View File

@@ -107,7 +107,7 @@ populate_container_lists() {
systemctl is-active --quiet docker
if [[ $? = 0 ]]; then
mapfile -t docker_raw_list < <(curl -s --unix-socket /var/run/docker.sock http:/containers/json?all=1 \
mapfile -t docker_raw_list < <(curl -s --unix-socket /var/run/docker.sock http:/v2/containers/json?all=1 \
| jq -c '.[] | { Name: .Names[0], State: .State }' \
| tr -d '/{"}')
else