jellyfin: allow Jellyfin to resolve lldap hostname while running in host network mode (#7941)

This commit is contained in:
Simon L.
2026-04-20 11:42:19 +02:00
committed by GitHub
3 changed files with 22 additions and 0 deletions

View File

@@ -41,6 +41,9 @@ readonly class ContainerDefinitionFetcher {
{
$data = json_decode((string)file_get_contents(DataConst::GetContainersDefinitionPath()), true, 512, JSON_THROW_ON_ERROR);
// We store this information for later because we need to use it to distinct between community containers and default containers.
$standardContainerNames = array_column($data['aio_services_v1'], 'container_name');
$additionalContainerNames = [];
foreach ($this->configurationManager->aioCommunityContainers as $communityContainer) {
if ($communityContainer !== '') {
@@ -212,6 +215,15 @@ readonly class ContainerDefinitionFetcher {
if (!$this->configurationManager->isWhiteboardEnabled) {
continue;
}
} else {
// Skip dependencies on community containers that are not currently enabled.
// Only apply this when the current entry is itself a community container,
// and the dependency is not an enabled community container or a standard built-in container.
if (in_array($entry['container_name'], $additionalContainerNames, true)
&& !in_array($value, $additionalContainerNames, true)
&& !in_array($value, $standardContainerNames, true)) {
continue;
}
}
$dependsOn[] = $value;
}

View File

@@ -425,6 +425,13 @@ readonly class DockerActionManager {
// $mounts[] = ["Type" => "bind", "Source" => $volume->name, "Target" => $volume->mountPoint, "ReadOnly" => !$volume->isWritable, "BindOptions" => [ "Propagation" => "rshared"]];
// }
// Special things for the jellyfin community container
} elseif ($container->identifier === 'nextcloud-aio-jellyfin') {
$lldapIp = gethostbyname('nextcloud-aio-lldap');
if ($lldapIp !== 'nextcloud-aio-lldap') {
$requestBody['HostConfig']['ExtraHosts'] = ['nextcloud-aio-lldap:' . $lldapIp];
}
// Special things for the caddy community container
} elseif ($container->identifier === 'nextcloud-aio-caddy') {
$requestBody['HostConfig']['ExtraHosts'] = ['host.docker.internal:host-gateway'];