diff --git a/iac/src/main/utils/docker.cljs b/iac/src/main/utils/docker.cljs new file mode 100644 index 0000000..590beac --- /dev/null +++ b/iac/src/main/utils/docker.cljs @@ -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]}}}) \ No newline at end of file