improve UI when exiting shell in docker container
This commit is contained in:
parent
d1135ba87d
commit
8c6d07fd2c
|
@ -185,12 +185,13 @@ chain s = case readish s of
|
||||||
Just ident@(ContainerIdent _image hn cn _rp) -> do
|
Just ident@(ContainerIdent _image hn cn _rp) -> do
|
||||||
let cid = ContainerId hn cn
|
let cid = ContainerId hn cn
|
||||||
writeFile propellorIdent (show ident)
|
writeFile propellorIdent (show ident)
|
||||||
t <- async $ simpleSh $ namedPipe cid
|
void $ async $ simpleSh $ namedPipe cid
|
||||||
void $ ifM (inPath "bash")
|
forever $ do
|
||||||
( boolSystem "bash" [Param "-l"]
|
void $ ifM (inPath "bash")
|
||||||
, boolSystem "/bin/sh" []
|
( boolSystem "bash" [Param "-l"]
|
||||||
)
|
, boolSystem "/bin/sh" []
|
||||||
wait t
|
)
|
||||||
|
putStrLn "Container is still running. Press ^P^Q to detach."
|
||||||
|
|
||||||
-- | Once a container is running, propellor can be run inside
|
-- | Once a container is running, propellor can be run inside
|
||||||
-- it to provision it.
|
-- it to provision it.
|
||||||
|
|
Loading…
Reference in New Issue