parent
45ace462c3
commit
9e2518b0ea
1 changed files with 2 additions and 2 deletions
|
@ -668,14 +668,14 @@ while True:
|
|||
|
||||
elif command[0] == "$dopull":
|
||||
irc.send_irc(channel, nick + ":[...] Please wait, pulling docker image...")
|
||||
image = dock.images.pull('alpine')
|
||||
image = dock.images.pull('alpine/edge')
|
||||
irc.send_irc(channel, nick + ":[OK] Pulled docker image, running command now.")
|
||||
elif command[0] == "$doshell":
|
||||
if len(command) > 1:
|
||||
try:
|
||||
print("Running container")
|
||||
if cntr == None:
|
||||
cntr = dock.containers.run('alpine', "/bin/ash", detach=True, tty=True)
|
||||
cntr = dock.containers.run('alpine/edge', "/bin/ash", detach=True, tty=True)
|
||||
print("Executing...")
|
||||
_, stream = cntr.exec_run(cmd=" ".join(command[1:]))
|
||||
multiline(stream, channel)
|
||||
|
|
Loading…
Add table
Reference in a new issue