netbootxyz / netboot.xyz

Your favorite operating systems in one place. A network-based bootable operating system installer based on iPXE.
https://netboot.xyz
Apache License 2.0
8.78k stars 663 forks source link

Docker compose on docker hub not requesting all ports #1409

Closed geekmoto13 closed 6 months ago

geekmoto13 commented 6 months ago

Describe the bug Ports 69 and 8080 are not being exposed when run on qnap devices To Reproduce Steps to reproduce the behavior:

  1. Use container station 3 to build NetBoot.xyz using the docker image on docker hub. The ports have to be manually specified on the second page of configuration

Expected behavior All ports requested for container do not show up with default config.

Screenshots

Additional context This may also be a qnap specific problem but there is no way to upload files to the server for things like windows pxe

geekmoto13 commented 6 months ago

have confirmed this behavior also happens on self hosted docker instances and the ports have to manually specified

antonym commented 6 months ago

The services in the container are set to 80 (http), 3000 (webapp), and 69/udp (tftp). You'll need to set those in your configuration and make sure there isn't anything using those existing ports on your qnap. If you need to upload files, you would copy them to the assets folder you have defined or download them via the webapp.

geekmoto13 commented 6 months ago

@ qnap default config netbootxyz

portqry results thats the thing, when the qnap and self hosted docker instances pull the compose, 3000 is the only one set, 8080 and 69 dont show up under the container config and have to be manually added in a NAT config for networking.

antonym commented 6 months ago

I'm guessing it's relying on the EXPOSE settings in the Dockerfile and currently I only have 3000 set. I'll enable EXPOSE for 80 and 69/udp as they seem to mainly just document which ports can be opened to docker but they can still overridden if needed.

https://docs.docker.com/engine/reference/builder/#expose

geekmoto13 commented 6 months ago

sorry if my initial post didnt indicate that, I should have provided screenshots on the initial post. thats my bad.

antonym commented 6 months ago

No worries, screenshot helps for sure, so many implementations out there. Give the latest container a try once it deploys out and let me know if the behavior is working better.

geekmoto13 commented 6 months ago

yeah the qnap device seems to have pulled the new config and has all the ports listed at least, qnap has a strange docker implementation, but it now seems to work as intended and is responding to portqry

this has now been fixed

antonym commented 6 months ago

Sweet, I see them listed in docker inspect:


 "NetworkSettings": {
            "Ports": {
                "3000/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "3000"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "3000"
                    }
                ],
                "69/udp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "69"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "69"
                    }
                ],
                "80/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "8080"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "8080"
                    }
                ]
            },
geekmoto13 commented 6 months ago

Also what I meant with not being able to get stuff on To the server is that the container is so isolated (likely qnap specific logic) that the container isn’t allowed to access any files on the host system to allow the user to pull in files. I have gotten a container setup on a proxmox box after my qnap nas nearly took down my network during a reboot. Might be an idea to implement a built in ftp client to allow file management for devices that isolate containers but will need to do some testing with proxmox to see how far that extends if it’s a docker thing or just qnap specific