File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 39
39
#:memory-mb (or/c #f exact-nonnegative-integer?)
40
40
#:swap-mb (or/c #f exact-nonnegative-integer?)
41
41
#:envvars (hash/c string? string?)
42
+ #:ports (hash/c integer? integer?)
42
43
#:replace? boolean?)
43
44
. ->* .
44
45
string?)]
157
158
#:memory-mb [memory-mb #f ]
158
159
#:swap-mb [swap-mb #f ]
159
160
#:envvars [envvars (hash)]
161
+ #:ports [ports (hash)]
160
162
#:replace? [replace? #f ])
161
163
(when replace?
162
164
(define id (docker-id #:name name))
178
180
(~a "--volume= " (car vol) ": " (cadr vol) ": " (caddr vol)))
179
181
(for/list ([key (in-hash-keys envvars)])
180
182
(~a "-e " key "= " (hash-ref envvars key)))
183
+ (for/list ([key (in-hash-keys ports)])
184
+ (~a "-p " key ": " (hash-ref ports key)))
181
185
(if (or memory-mb swap-mb)
182
186
(list (format "--memory=~am " (or memory-mb swap-mb))
183
187
(format "--memory-swap=~am " (+ (or memory-mb swap-mb) (or swap-mb memory-mb))))
You can’t perform that action at this time.
0 commit comments