sbs20 / scanservjs

SANE scanner nodejs web ui
https://sbs20.github.io/scanservjs/
GNU General Public License v2.0
766 stars 145 forks source link

allow override port 8080 #614

Closed mdeanda closed 1 year ago

mdeanda commented 1 year ago

I've found that running the docker container and against a networked Brother DCP-L2540DW series has issues unless its run with --net=host and --privileged. Unfortunately, it causes problems when the host runs other (more important) things on port 8080 since I can no longer map ports.

It would be nice if we can override the port through an environment variable passed through docker.

sbs20 commented 1 year ago

Hi. Can't you just keep the port in the container, but map it to different port on the host?

E.g. this would map 9090 on the host to 8080 in the container...

docker run -d -p 9090:8080 \
  -v /var/run/dbus:/var/run/dbus \
  --name scanservjs-container sbs20/scanservjs:latest

(I am closing this, because I think this resolves your issue. Please let me know if not and will consider re-opening)