Download docker/inspect.lisp from Snapkitty/nekomata: direct link, hf CLI and curl.
- Browser
- Download file 573 Bytes
-
https://huggingface.co/Snapkitty/nekomata/resolve/main/docker/inspect.lisp
- Command line
-
hf download hf://Snapkitty/nekomata/docker/inspect.lisp
-
curl -L -o inspect.lisp https://huggingface.co/Snapkitty/nekomata/resolve/main/docker/inspect.lisp
573 Bytes
| (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))) | |