Skip to content

DOMAIN_NAME environment variable not working #47

@guillian77

Description

@guillian77

Hi, thanks a lot for your great work.

I am trying to specify custom DNS by using DOMAIN_NAME environment variable but it did not work.
I read your code a bit and I have debugging something interresting.

// src/Synchronizer.php:120
// Global
if (!empty($container['NetworkSettings']['IPAddress'])) {
    $ip = $container['NetworkSettings']['IPAddress'];

    $lines[$ip] = implode(' ', $this->getContainerHosts($container));
}

For me this condition cannot be true because $container['NetworkSettings']['IPAddress'] is null or empty.

I just move $lines[$ip] = implode(' ', $this->getContainerHosts($container)); to line 130 just after $ip declaration and it work great.

I don't know if it's really a bug or this problem come from my setup.

Maybe I have to specify an other thing to make it work ?

Docker version 20.10.6, build 370c289
docker-compose version 1.28.6, build 5db8d86f

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions