mirror of
https://github.com/DerTyp7/docker_minecraft_server_auto_starter.git
synced 2025-10-30 04:57:09 +01:00
Add placeholder server sleeping IP environment
variable
This commit is contained in:
@@ -32,13 +32,6 @@ class DockerHandler:
|
||||
containers = self.client.containers.list(all=True)
|
||||
|
||||
for container in containers:
|
||||
print('current network: {}'.format(self.current_network))
|
||||
print('checking container {}'.format(container.name))
|
||||
print('container networks: {}'.format(
|
||||
container.attrs['NetworkSettings']['Networks']))
|
||||
print('container ip: {}'.format(
|
||||
container.attrs['NetworkSettings']['Networks'][self.current_network]['IPAMConfig']['IPv4Address']))
|
||||
|
||||
networks = container.attrs['NetworkSettings']['Networks']
|
||||
if self.current_network in networks and networks[self.current_network]['IPAMConfig']['IPv4Address'] == ip:
|
||||
print('found docker container {} with ip {} in network {}'.format(
|
||||
|
||||
Reference in New Issue
Block a user