mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-29 12:06:30 +00:00
Compare commits
8 Commits
306df2e6b8
...
bd77b12d06
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bd77b12d06 | ||
![]() |
ad5827d33f | ||
![]() |
249464e928 | ||
![]() |
3bc55c054a | ||
![]() |
2470d16d85 | ||
![]() |
5c0172440a | ||
![]() |
006db94cc0 | ||
![]() |
9f1ab99265 |
@ -28,15 +28,15 @@ RUN \
|
||||
\
|
||||
&& curl -Lso /usr/bin/cosign "https://github.com/home-assistant/cosign/releases/download/${COSIGN_VERSION}/cosign_${BUILD_ARCH}" \
|
||||
&& chmod a+x /usr/bin/cosign \
|
||||
&& pip3 install uv==0.2.21
|
||||
&& pip3 install uv==0.6.1
|
||||
|
||||
# Install requirements
|
||||
COPY requirements.txt .
|
||||
RUN \
|
||||
if [ "${BUILD_ARCH}" = "i386" ]; then \
|
||||
linux32 uv pip install --no-build -r requirements.txt; \
|
||||
linux32 uv pip install --compile-bytecode --no-build -r requirements.txt; \
|
||||
else \
|
||||
uv pip install --no-build -r requirements.txt; \
|
||||
uv pip install --compile-bytecode --no-build -r requirements.txt; \
|
||||
fi \
|
||||
&& rm -f requirements.txt
|
||||
|
||||
|
@ -21,7 +21,7 @@ pyudev==0.24.3
|
||||
PyYAML==6.0.2
|
||||
requests==2.32.3
|
||||
securetar==2025.2.0
|
||||
sentry-sdk==2.21.0
|
||||
sentry-sdk==2.22.0
|
||||
setuptools==75.8.0
|
||||
voluptuous==0.15.2
|
||||
dbus-fast==2.33.0
|
||||
|
@ -43,6 +43,7 @@ SYSTEMD_JOURNAL_VOLATILE = Path("/run/log/journal")
|
||||
DOCKER_NETWORK = "hassio"
|
||||
DOCKER_NETWORK_MASK = ip_network("172.30.32.0/23")
|
||||
DOCKER_NETWORK_RANGE = ip_network("172.30.33.0/24")
|
||||
DOCKER_NETWORK_ULA = ip_network("fd00:172:30:32::/64")
|
||||
|
||||
# This needs to match the dockerd --cpu-rt-runtime= argument.
|
||||
DOCKER_CPU_RUNTIME_TOTAL = 950_000
|
||||
|
@ -7,7 +7,12 @@ import logging
|
||||
import docker
|
||||
import requests
|
||||
|
||||
from ..const import DOCKER_NETWORK, DOCKER_NETWORK_MASK, DOCKER_NETWORK_RANGE
|
||||
from ..const import (
|
||||
DOCKER_NETWORK,
|
||||
DOCKER_NETWORK_MASK,
|
||||
DOCKER_NETWORK_RANGE,
|
||||
DOCKER_NETWORK_ULA,
|
||||
)
|
||||
from ..exceptions import DockerError
|
||||
|
||||
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
||||
@ -76,19 +81,25 @@ class DockerNetwork:
|
||||
except docker.errors.NotFound:
|
||||
_LOGGER.info("Can't find Supervisor network, creating a new network")
|
||||
|
||||
ipam_pool = docker.types.IPAMPool(
|
||||
# IP configuration
|
||||
ipam_pool_v4 = docker.types.IPAMPool(
|
||||
subnet=str(DOCKER_NETWORK_MASK),
|
||||
gateway=str(self.gateway),
|
||||
iprange=str(DOCKER_NETWORK_RANGE),
|
||||
)
|
||||
ipam_pool_v6 = docker.types.IPAMPool(
|
||||
subnet=str(DOCKER_NETWORK_ULA),
|
||||
gateway=str(DOCKER_NETWORK_ULA[1]),
|
||||
)
|
||||
|
||||
ipam_config = docker.types.IPAMConfig(pool_configs=[ipam_pool])
|
||||
ipam_config = docker.types.IPAMConfig(pool_configs=[ipam_pool_v4, ipam_pool_v6])
|
||||
|
||||
# Create Network
|
||||
return self.docker.networks.create(
|
||||
DOCKER_NETWORK,
|
||||
driver="bridge",
|
||||
ipam=ipam_config,
|
||||
enable_ipv6=False,
|
||||
enable_ipv6=True,
|
||||
options={"com.docker.network.bridge.name": DOCKER_NETWORK},
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user