Seems like you could simply change this
# Create & Run container
docker_container = self.sys_docker.run(
self.image,
version=self.addon.version,
name=self.name,
hostname=self.addon.hostname,
detach=True,
init=True,
privileged=self.full_access,
ipc_mode=self.ipc,
stdin_open=self.addon.with_stdin,
network_mode=self.network_mode,
pid_mode=self.pid_mode,
ports=self.ports,
extra_hosts=self.network_mapping,
devices=self.devices,
cap_add=self.addon.privileged,
security_opt=self.security_opt,
environment=self.environment,
volumes=self.volumes,
tmpfs=self.tmpfs,
)
to this
# Create & Run container
docker_container = self.sys_docker.run(
self.image,
version=self.addon.version,
name=self.name,
hostname=self.addon.hostname,
detach=True,
init=True,
privileged=self.full_access,
ipc_mode=self.ipc,
stdin_open=self.addon.with_stdin,
network_mode=self.network_mode,
pid_mode=self.pid_mode,
ports=self.ports,
extra_hosts=self.network_mapping,
devices=self.devices,
cap_add=self.addon.privileged,
security_opt=self.security_opt,
environment=self.environment,
volumes=self.volumes,
tmpfs=self.tmpfs,
label=self.name
)
I’m not sure if self.name is the correct name though. It appears to be the name of the container. Either way, this is the section you’d be adding it to.
EDIT: Nevermind, It would might require more changes to the sys_docker.run command