mirror of
https://github.com/unraid/webgui.git
synced 2026-01-13 05:00:06 -06:00
Add HOST_HOSTNAME and HOST_CONTAINERNAME env vars
add extra environment variables to the container
This commit is contained in:
@@ -243,6 +243,11 @@ function xmlToCommand($xml, $create_paths=false) {
|
||||
$Variables[] = 'TZ="'.$var['timeZone'].'"';
|
||||
// Add HOST_OS variable
|
||||
$Variables[] = 'HOST_OS="Unraid"';
|
||||
// Add HOST_HOSTNAME variable
|
||||
$Variables[] = 'HOST_HOSTNAME=$HOSTNAME';
|
||||
// Add HOST_CONTAINERNAME variable
|
||||
$Variables[] = 'HOST_CONTAINERNAME='.escapeshellarg($xml['Name']);
|
||||
|
||||
// Docker labels for WebUI and Icon
|
||||
$Labels[] = 'net.unraid.docker.managed=dockerman';
|
||||
if (strlen($xml['WebUI'])) $Labels[] = 'net.unraid.docker.webui='.escapeshellarg($xml['WebUI']);
|
||||
|
||||
Reference in New Issue
Block a user