mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
use name
This commit is contained in:
parent
bb7ebb38e4
commit
06f6251b63
1 changed files with 2 additions and 0 deletions
|
@ -76,6 +76,7 @@ def create(ctx: Context, image: str, name: str = ""):
|
|||
cmd = [
|
||||
"/usr/bin/docker",
|
||||
"create",
|
||||
f"--name={name}",
|
||||
"--privileged",
|
||||
# "--ulimit",
|
||||
# "\"nofile=262144:262144\"",
|
||||
|
@ -101,6 +102,7 @@ def create(ctx: Context, image: str, name: str = ""):
|
|||
"rescue.target",
|
||||
],
|
||||
)
|
||||
ctx.info(f"command is: {cmd}")
|
||||
ret = ctx.run(*cmd, capture=True, check=False)
|
||||
if ret.returncode != 0:
|
||||
ctx.warn(ret.stderr.decode())
|
||||
|
|
Loading…
Add table
Reference in a new issue