From c5e808c5d60053fbd1b3df263d0f933da483688d Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Fri, 6 Sep 2024 17:34:42 +0200 Subject: [PATCH] Add --rm to cleanup docker containers after command execution --- src/grisp_tools_build.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/grisp_tools_build.erl b/src/grisp_tools_build.erl index 3161414..924745b 100644 --- a/src/grisp_tools_build.erl +++ b/src/grisp_tools_build.erl @@ -270,6 +270,7 @@ dockerize_command(Cmd, S0) -> {docker, Image} = mapz:deep_get([paths, toolchain], S0), BuildSubdir = string:prefix(BuidPath, Cwd), ["docker run", + " --rm ", [" -e " ++ K ++ "=" ++ io_lib:format("~s",[V])|| {K,V} <- maps:to_list(Env)], " --volume " ++ Cwd ++ ":" ++ Cwd, " " ++ Image ++ " sh -c \"cd " ++ Cwd ++ BuildSubdir,