Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit cbba5c5

Browse files
committed
Fix new containers causing all other containers to dissappear
1 parent 8982938 commit cbba5c5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Docker/docker.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,25 @@ function updateContainer(id,name,imageRepo,imageTag,state)
176176
else
177177
Containers[index] = container
178178
end
179+
180+
-- update hack
181+
-- when new containers are started, all old containers dissappear
182+
-- they're still running, but for some reason stop being displayed until they're updated
183+
-- this forces them to re-render in world
184+
LOG("New container detected: Refreshing all...")
185+
for i=1, table.getn(Containers)
186+
do
187+
LOG("Refreshing container '" .. Containers[i].name .. "'")
188+
189+
-- Display
190+
Containers[i]:display(Containers[i].running)
191+
192+
-- YES WE NEED TO DO IT TWICE
193+
-- The signs don't display correctly on first re-render
194+
-- Do it again to make signs work
195+
-- Look don't ask me why, but it works so ¯\_(ツ)_/¯
196+
Containers[i]:display(Containers[i].running)
197+
end
179198
end
180199

181200
--

0 commit comments

Comments
 (0)