Adds support for automatic pulling of docker images

This commit is contained in:
2022-03-07 10:55:21 -05:00
parent e96695b3c8
commit 7d76f99ff9
2 changed files with 1 additions and 1 deletions

View File

@@ -366,6 +366,7 @@ Deny from all""")
database.command(f"UPDATE docker SET action='stopped' WHERE ID='{id}'")
writeLog(f"Container with id of {id} was stopped", 24)
elif x[1] == "starting": # Will start all containers that are neccessary
dockerClient.images.pull(x[2])
password = x[3]
if x[2] == "lscr.io/linuxserver/code-server": # Special case for code server.
newID = dockerClient.containers.run(x[2], detach=True, ports={'8443/tcp':x[5]}, remove=True, environment=["PUID=1000", "PGID=1000", "TZ=America/Detroit", f"PASSWORD={password}", f"SUDO_PASSWORD={password}", "DEFAULT_WORKSPACE=/config/workspace"]).attrs["Id"]