netdisco / netdisco-docker

Docker images for App::Netdisco
BSD 3-Clause "New" or "Revised" License
49 stars 15 forks source link

Deploying netdisco-docker without IPv6 inside the container #56

Closed fenner closed 1 year ago

fenner commented 1 year ago

Expected Behavior

netdisco-web should start

Current Behavior

netdisco-web logs:

2023/03/21-04:56:54 Starman::Server (type Net::Server::PreFork) starting! pid(8)
Resolved [*]:5000 to [::]:5000, IPv6
Not including resolved host [0.0.0.0] IPv4 because it will be handled by [::] IPv6
Binding to TCP port 5000 on host :: with IPv6
2023/03/21-04:56:54 Can't connect to TCP port 5000 on :: [Invalid argument]
  at line 66 in file /home/netdisco/perl5/lib/perl5/Net/Server/Proto/TCP.pm

Possible Solution

In the docker-compose.yml

  netdisco-web:
...
    # to avoid netdisco-web binding to IPv6, which does not work
    # in this docker config
    command: foreground --host=0.0.0.0

This could also be changed in the Dockerfile for the netdisco-web image. (And then someone who wants to bind to IPv6 could supply the command in the docker-compose)

Steps to Reproduce (for bugs)

docker-compose up in an environment in which IPv6 is not enabled by default inside docker containers

fenner commented 1 year ago

Oops! This is a duplicate of #50 , sorry.