Mercurial > core / lisp/lib/skel/comp/container.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
cc89b337384b
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
1 ;;; container.lisp --- Containerfile Components 3 ;; Containerfile skel components. 7 ;; By convention we consider any file with base-name 'Containerfile' 8 ;; (case-sensitive) to be an OCI Containerfile. Extension is used as the name 9 ;; of the containerfile, or if absent defaults to the directory name. 12 (in-package :skel/comp/container) 14 (defclass sk-containerfile (sk-component containerfile) 17 (defmethod print-object ((object sk-containerfile) stream) 18 (print-unreadable-object (object stream :type t) 19 (format stream "~A" (file-namestring (containerfile-path object))))) 21 (defmethod sk-convert ((self containerfile)) 22 (let ((self (change-class self 'sk-containerfile))) 26 (defmethod sk-load-component ((kind (eql :containerfile)) 28 &optional (path *default-pathname-defaults*)) 29 (declare (ignore kind)) 30 (sk-convert (deserialize 31 (make-pathname :name *default-containerfile* :type (namestring name) 32 :directory (namestring path)) 35 (defmethod sk-write-file ((self sk-containerfile) &key path) 36 (serde self (pathname (or path (containerfile-path self))))) 38 (defmethod sk-read-file ((self sk-containerfile) path) 39 (sk-load-component :containerfile path)) 41 (defmethod sk-path ((self sk-containerfile)) 42 (containerfile-path self)) 44 (defmethod sk-build ((self sk-containerfile) &key with-client no-cache tag) 46 (null (apply 'pod::run-podman (flatten (concatenate 'list 49 ,@(when no-cache (list "--no-cache"))) 50 (when tag (list "-t" tag )))))) 53 (with-libpod-client (c) 54 (libpod-request-json c "containers/json") 55 (nyi! "need to implement containerfile libpod request method"))) 57 (t (with-libpod-client (c with-client)