Include role options when executing commands

This commit is contained in:
Bruno Prieto
2023-07-15 23:59:49 +02:00
parent 61b7dc90f2
commit cbd180205d
2 changed files with 16 additions and 0 deletions

View File

@@ -76,11 +76,14 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
end
def execute_in_new_container(*command, interactive: false)
role = config.role(self.role)
docker :run,
("-it" if interactive),
"--rm",
*config.env_args,
*config.volume_args,
*role&.option_args,
config.absolute_image,
*command
end