From 80ca346a4cb183a6a1e684f6d8a9e19e3fc55d0e Mon Sep 17 00:00:00 2001 From: asteroide Date: Wed, 10 May 2017 10:38:55 +0200 Subject: Limit the length of the hostname to 63 characters due to the hostname length limitation Change-Id: I8552b9f29e8bae04d8f6fcaf2085402b2250e7e8 --- moonv4/moon_orchestrator/moon_orchestrator/dockers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'moonv4/moon_orchestrator') diff --git a/moonv4/moon_orchestrator/moon_orchestrator/dockers.py b/moonv4/moon_orchestrator/moon_orchestrator/dockers.py index 2eecdc0e..0b53de96 100644 --- a/moonv4/moon_orchestrator/moon_orchestrator/dockers.py +++ b/moonv4/moon_orchestrator/moon_orchestrator/dockers.py @@ -148,7 +148,7 @@ RUN pip3 install --upgrade . output = self.docker.create_container(image=self.tag, command=list(self.run_cmd), - hostname=str(self.id.replace("_", "-")), + hostname=str(self.id.replace("_", "-"))[:63], name=str(self.id), networking_config=self.__get_docker_network(), host_config=host_config -- cgit 1.2.3-korg