File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 107
107
; ; Tty wraps the process in a pseudo terminal
108
108
{:StdinOnce true
109
109
:OpenStdin true }
110
- (defn create-container [{:keys [image entrypoint command host-dir env thread-id opts] :or {opts {:Tty true }}}]
110
+ (defn create-container [{:keys [image entrypoint command host-dir env thread-id opts mounts ] :or {opts {:Tty true }}}]
111
111
(let [payload (json/generate-string
112
112
(merge
113
113
{:Image image}
120
120
(concat [(format " %s:/project:rw" host-dir)
121
121
" docker-lsp:/docker-lsp"
122
122
" /var/run/docker.sock:/var/run/docker.sock" ]
123
- (when thread-id [(format " %s:/thread:rw" thread-id)]))}
123
+ (when thread-id [(format " %s:/thread:rw" thread-id)])
124
+ mounts)}
124
125
:WorkingDir " /project" })
125
126
(when entrypoint {:Entrypoint entrypoint})
126
127
(when command {:Cmd command})))]
Original file line number Diff line number Diff line change
1
+ (ns trace
2
+ (:require
3
+ [cheshire.core :as json]))
4
+
5
+ (def trace (atom {}))
6
+
7
+ (defn container-call [definition ]
8
+ (swap! trace update-in [:container-calls ] (fnil concat []) [(into {} (dissoc definition :prompts ))]))
9
+
10
+ (defn dump []
11
+ (spit " trace.edn" (pr-str @trace)))
You can’t perform that action at this time.
0 commit comments