Docker Container Only Listening on IPv6

I’m working on trying to set up a test Discourse instance in a VM so I can work on importing from another software. I’m new to Docker, Discourse, and Ruby, so I’m not yet familiar with what’s going on in the background. So far, I’ve forked the discourse_docker repo and then used that following the instructions here (using my own local Ubuntu VM instead of a cloud instance): discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub

After setup, according to netstat, it appears my local VM here has set up the container in such a way that ports 80 and 443 are only listening on the IPv6 IP. I don’t use IPv6 locally, so I can’t access the Discourse instance. How can I correct this? I looked in app.yml but there don’t appear to be any bind settings in there. I’ve search for anyone having a similar issue - there was one hit from I think 2015 where the resolution was to go change the DNS configuration inside the container itself. This sounds like a Bad Idea™ so I’m hoping for something a bit less hacky.

Thanks!

You likely don’t need to fork the repo.

It’s likely a problem with your virtual host. I’ve never seen it before.

I forked the repo in an attempt to follow this guide:

I wouldn’t expect that to cause any issues, though.
I’m running a fresh install of Ubuntu Server (downloaded from ubuntu.com) on ESXi. This is all very standard stuff.

Where does the configuration make the determination on how to bind the services?

It binds to all ips by default.

You can add ips to lines that map the ports, but it’s likely a problem with the vm. It’s it digital ocean?

There are examples here for running an import in a container. They are likely to be better than the one you linked to (but I didn’t look at it, so I could be wrong).

No, I have my own VMware host that I’m using to run the VM. I don’t have any trouble reaching the VM over IPv4 either directly or via the DNS name. It’s just that for some reason, the docker services (not default things like SSH server) are only binding to :::80 and :::443 instead of 0.0.0.0.

Is there a relevant log file somewhere that might provide some details?

There are examples here for running an import in a container. They are likely to be better than the one you linked to (but I didn’t look at it, so I could be wrong).

Well, so far I haven’t gotten to the import part yet. :stuck_out_tongue:
Ultimately, I’d like to work on improving this import script for our site. I’ve been struggling so far with a few different guides on getting started but I figured the basic plain install would be the way to go for now.

It’s something in docker or your vm. I’d look at vm and docker guides and start with some hello world container. This isn’t a Discourse problem.

1 Like