daemon: updates to change hostname settings to replace _ to - due to _ being an invalid character
This commit is contained in:
parent
9991942e7b
commit
9c265ab283
2 changed files with 3 additions and 1 deletions
|
@ -142,8 +142,9 @@ class DockerNode(CoreNode):
|
|||
volumes += (
|
||||
f"--mount type=volume," f"source={volume.src},target={volume.dst} "
|
||||
)
|
||||
hostname = self.name.replace("_", "-")
|
||||
self.host_cmd(
|
||||
f"{DOCKER} run -td --init --net=none --hostname {self.name} "
|
||||
f"{DOCKER} run -td --init --net=none --hostname {hostname} "
|
||||
f"--name {self.name} --sysctl net.ipv6.conf.all.disable_ipv6=0 "
|
||||
f"{binds} {volumes} "
|
||||
f"--privileged {self.image} tail -f /dev/null"
|
||||
|
|
|
@ -28,6 +28,7 @@ class LinuxNetClient:
|
|||
:param name: name for hostname
|
||||
:return: nothing
|
||||
"""
|
||||
name = name.replace("_", "-")
|
||||
self.run(f"hostname {name}")
|
||||
|
||||
def create_route(self, route: str, device: str) -> None:
|
||||
|
|
Loading…
Reference in a new issue