File size: 573 Bytes
3b70664 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | (in-package #:nekod.docker)
(defun inspect-container (sock id)
"Inspect a container — returns full state as string (JSON)."
(multiple-value-bind (status body)
(docker-get sock (format nil "/containers/~a/json" id))
(if (= status 200) body
(error 'nekod:docker-api-error :message body :status-code status
:endpoint (format nil "/containers/~a/json" id)))))
(defun container-stats (sock id)
"Get container resource stats (CPU, memory, network)."
(docker-get sock (format nil "/containers/~a/stats?stream=false" id)))
|