mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
[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:
@@ -107,7 +107,7 @@ populate_container_lists() {
|
|||||||
systemctl is-active --quiet docker
|
systemctl is-active --quiet docker
|
||||||
|
|
||||||
if [[ $? = 0 ]]; then
|
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 }' \
|
| jq -c '.[] | { Name: .Names[0], State: .State }' \
|
||||||
| tr -d '/{"}')
|
| tr -d '/{"}')
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user