Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix new containers causing all other containers to dissappear
  • Loading branch information
luludotdev committed Oct 15, 2017
1 parent 8982938 commit cbba5c5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Docker/docker.lua
Expand Up @@ -176,6 +176,25 @@ function updateContainer(id,name,imageRepo,imageTag,state)
else
Containers[index] = container
end

-- update hack
-- when new containers are started, all old containers dissappear
-- they're still running, but for some reason stop being displayed until they're updated
-- this forces them to re-render in world
LOG("New container detected: Refreshing all...")
for i=1, table.getn(Containers)
do
LOG("Refreshing container '" .. Containers[i].name .. "'")

-- Display
Containers[i]:display(Containers[i].running)

-- YES WE NEED TO DO IT TWICE
-- The signs don't display correctly on first re-render
-- Do it again to make signs work
-- Look don't ask me why, but it works so ¯\_(ツ)_/¯
Containers[i]:display(Containers[i].running)

This comment has been minimized.

Copy link
@baracuda22221

baracuda22221 Mar 12, 2022

cs

end
end

--
Expand Down

0 comments on commit cbba5c5

Please sign in to comment.