Add docker as a utils option
This commit is contained in:
23
iac/src/main/utils/docker.cljs
Normal file
23
iac/src/main/utils/docker.cljs
Normal 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]}}})
|
||||
Reference in New Issue
Block a user