Skip to content

Commit 48c9038

Browse files
committed
Pass in STACK_YAML env var to Docker if set
1 parent e4ba0b4 commit 48c9038

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Stack/Docker.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ runContainerAndExit = do
186186
bamboo = lookup "bamboo_buildKey" env
187187
jenkins = lookup "JENKINS_HOME" env
188188
msshAuthSock = lookup "SSH_AUTH_SOCK" env
189+
mstackYaml = lookup "STACK_YAML" env
189190
muserEnv = lookup "USER" env
190191
isRemoteDocker = maybe False (isPrefixOf "tcp://") dockerHost
191192
image <- either throwIO pure (dockerImage docker)
@@ -267,6 +268,11 @@ runContainerAndExit = do
267268
Just sshAuthSock ->
268269
["-e","SSH_AUTH_SOCK=" ++ sshAuthSock
269270
,"-v",sshAuthSock ++ ":" ++ sshAuthSock]
271+
,case mstackYaml of
272+
Nothing -> []
273+
Just stackYaml ->
274+
["-e","STACK_YAML=" ++ stackYaml
275+
,"-v",stackYaml++ ":" ++ stackYaml ++ ":ro"]
270276
-- Disable the deprecated entrypoint in FP Complete-generated images
271277
,["--entrypoint=/usr/bin/env"
272278
| isJust (lookupImageEnv oldSandboxIdEnvVar imageEnvVars) &&

0 commit comments

Comments
 (0)