Last active
December 21, 2022 19:49
-
-
Save eatonphil/59cdfeb4826c7a12a07d7055f6817a56 to your computer and use it in GitHub Desktop.
cl-docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defsystem :cl-docker | |
:depends-on (:cl-ppcre) | |
:serial t | |
:components ((:file "package") | |
(:file "docker"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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