Add docker as a utils option

This commit is contained in:
2025-11-14 21:36:50 -06:00
parent 4371b7a2aa
commit 711d10ff7e

View File

@@ -0,0 +1,23 @@
(ns utils.docker
(:require
[utils.general :refer [generic-transform deep-merge new-resource component-factory resource-factory deploy-stack-factory iterate-stack]]
["@pulumi/docker-build" :as docker]
["path" :as path]
[configs :refer [cfg]]))
(defn image [{:keys [app-name]}]
(let [context-path (.. path (join "." (-> cfg :resource-path)))
dockerfile-path (.. path (join context-path (str app-name ".dockerfile")))
base-args {;;:context {:location context-path}
;;:dockerfile {:location dockerfile-path}
;;:imageName (str (-> cfg :docker-repo) "/" app-name ":latest")
}]
base-args))
(def defaults
{:image image})
(def component-specs-defs
{:root-sym 'docker
:provider-key :harbor
:resources {:image {:path ['-Image]}}})