MauriceNino / dashdot

A simple, modern server dashboard, primarily used by smaller private servers
https://getdashdot.com/
MIT License
2.56k stars 94 forks source link

[Bug] Docker Ignores Custom Port #1009

Closed jjonesdesign closed 7 months ago

jjonesdesign commented 7 months ago

Description of the bug

When launching a docker container and providing a port different from 3001, it fails to use the specified port.

How to reproduce

docker container run -it \
  -p 80:3002 \
  --privileged \
  -v /:/mnt/host:ro \
  mauricenino/dashdot

Relevant log output

yarn run v1.22.19
$ node .
listening on *:3001

Info output of dashdot cli

No response

What browsers are you seeing the problem on?

No response

Where is your instance running?

Linux Server

Additional context

No response

jbruell commented 7 months ago

IMO this isn't a bug. In your example, you're telling Docker to map the internal port 3002 to the external port 80. If you want to access dashdot on a different port in your browser, you can easily do that by changing the external port:

docker container run -it \
  -p 3002:3001 \
  --privileged \
  -v /:/mnt/host:ro \
  mauricenino/dashdot

You can read more about port mapping in Docker in the official docs: https://docs.docker.com/network/#published-ports

jjonesdesign commented 7 months ago

@jbruell You are absolutely right. This is my bad :(

Thanks for providing a helpful response <3