parent
67ced4e7bf
commit
bc8218ff9a
1 changed files with 2 additions and 0 deletions
|
@ -673,8 +673,10 @@ while True:
|
||||||
elif command[0] == "$doshell":
|
elif command[0] == "$doshell":
|
||||||
if len(command) > 1:
|
if len(command) > 1:
|
||||||
try:
|
try:
|
||||||
|
print("Running container")
|
||||||
if cntr == None:
|
if cntr == None:
|
||||||
cntr = dock.containers.run('alpine', "/bin/ash", detach=True, tty=True)
|
cntr = dock.containers.run('alpine', "/bin/ash", detach=True, tty=True)
|
||||||
|
print("Executing...")
|
||||||
_, stream = cntr.exec_run(cmd=" ".join(command[1:]))
|
_, stream = cntr.exec_run(cmd=" ".join(command[1:]))
|
||||||
multiline(stream, channel)
|
multiline(stream, channel)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
|
Loading…
Add table
Reference in a new issue