mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #465 from Security-Onion-Solutions/hotfix/so-status-docker-api
[fix] Use v2 of Docker http api
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