mirror of
https://github.com/dvddarias/docker-hoster
synced 2026-08-05 16:12:43 +02:00
Merge pull request #17 from aureleoules/develop
Handle container rename
This commit is contained in:
@@ -55,6 +55,13 @@ def main():
|
|||||||
hosts.pop(container_id)
|
hosts.pop(container_id)
|
||||||
update_hosts_file()
|
update_hosts_file()
|
||||||
|
|
||||||
|
if status=="rename":
|
||||||
|
container_id = e["id"]
|
||||||
|
if container_id in hosts:
|
||||||
|
container = get_container_data(dockerClient, container_id)
|
||||||
|
hosts[container_id] = container
|
||||||
|
update_hosts_file()
|
||||||
|
|
||||||
|
|
||||||
def get_container_data(dockerClient, container_id):
|
def get_container_data(dockerClient, container_id):
|
||||||
#extract all the info with the docker api
|
#extract all the info with the docker api
|
||||||
|
|||||||
Reference in New Issue
Block a user