mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-13 04:06:33 +00:00
parent
664334f1ad
commit
6a5bd5a014
@ -95,6 +95,17 @@ class DockerAddon(DockerInterface):
|
|||||||
if host_port
|
if host_port
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def security_opt(self):
|
||||||
|
"""Controlling security opt."""
|
||||||
|
privileged = self.addon.privileged or []
|
||||||
|
|
||||||
|
# Disable AppArmor sinse it make troubles wit SYS_ADMIN
|
||||||
|
if 'SYS_ADMIN' in privileged:
|
||||||
|
return [
|
||||||
|
"apparmor:unconfined",
|
||||||
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tmpfs(self):
|
def tmpfs(self):
|
||||||
"""Return tmpfs for docker add-on."""
|
"""Return tmpfs for docker add-on."""
|
||||||
@ -199,6 +210,7 @@ class DockerAddon(DockerInterface):
|
|||||||
extra_hosts=self.network_mapping,
|
extra_hosts=self.network_mapping,
|
||||||
devices=self.devices,
|
devices=self.devices,
|
||||||
cap_add=self.addon.privileged,
|
cap_add=self.addon.privileged,
|
||||||
|
security_opt=self.security_opt,
|
||||||
environment=self.environment,
|
environment=self.environment,
|
||||||
volumes=self.volumes,
|
volumes=self.volumes,
|
||||||
tmpfs=self.tmpfs
|
tmpfs=self.tmpfs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user