Skip to content

Instantly share code, notes, and snippets.

@eatonphil
Last active December 21, 2022 19:49
Show Gist options
  • Save eatonphil/59cdfeb4826c7a12a07d7055f6817a56 to your computer and use it in GitHub Desktop.
Save eatonphil/59cdfeb4826c7a12a07d7055f6817a56 to your computer and use it in GitHub Desktop.
cl-docker
(defsystem :cl-docker
:depends-on (:cl-ppcre)
:serial t
:components ((:file "package")
(:file "docker")))
(in-package :cl-docker)
(defun ps ()
(let ((output (uiop:run-program '("docker" "ps") :output :string)))
(loop for line in (rest (cl-ppcre:split "(\\n+)" output))
collect (cl-ppcre:split "(\\s\\s+)" line))))
(defpackage cl-docker
(:use cl)
(:import-from :cl-ppcre :split)
(:export :ps))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment