mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-09 02:49:43 +00:00
Adds host PID mode support for add-ons (#700)
* ✨ Adds host PID mode support for add-ons. * 🔒 Disables host PID mode when in protected mode * 🚦 Adds more negative rating weight to host PID mode
This commit is contained in:
committed by
Pascal Vizeli
parent
061420f279
commit
622e99e04c
@@ -165,6 +165,13 @@ class DockerAddon(DockerInterface):
|
||||
return 'host'
|
||||
return None
|
||||
|
||||
@property
|
||||
def pid_mode(self):
|
||||
"""Return PID mode for addon."""
|
||||
if not self.addon.protected and self.addon.host_pid:
|
||||
return 'host'
|
||||
return None
|
||||
|
||||
@property
|
||||
def volumes(self):
|
||||
"""Generate volumes for mappings."""
|
||||
@@ -277,6 +284,7 @@ class DockerAddon(DockerInterface):
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user