tileserver-gl
tileserver-gl copied to clipboard
documentation: change port info where docker run is mentioned from "-p 8080:80" to "-p 8080:8080" for v3.1.x
In the docs, where there's mention of 'docker run ... tileserver-gl', suggest changing the port info from '-p 8080:80' to '-p 8080:8080' for version 3.1.x and greater, so that it reads: docker run --rm -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl
As @hassan-essabir and @StephanZaat mention in https://github.com/maptiler/tileserver-gl/issues/503#issuecomment-750398389 , running on port 80 will require root access. I found on CentOS this to be a problem with 3.1.0 and 3.1.1; and it's not an obvious problem since the container does run -- it just doesn't respond to any requests. Changing to -p 8080:8080 was a simple workaround. Having upgraded from v3.0.0, where -p 8080:80 worked (and may have been required), it can be quite confusing to run into this problem.
In the docs, where there's mention of 'docker run ... tileserver-gl', suggest changing the port info from '-p 8080:80' to '-p 8080:8080' for version 3.1.x and greater, so that it reads:
docker run --rm -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl
As @hassan-essabir and @StephanZaat mention in #503 (comment) , running on port 80 will require root access. I found on CentOS this to be a problem with 3.1.0 and 3.1.1; and it's not an obvious problem since the container does run -- it just doesn't respond to any requests. Changing to -p 8080:8080 was a simple workaround. Having upgraded from v3.0.0, where -p 8080:80 worked (and may have been required), it can be quite confusing to run into this problem.
Oh yes that problem is confusing :D
Some might think it's the configuration or other related stuff. This should definitely be adapted
There appears to be a slightly wider issue.
There is an inconsistency in the port exposed through the Docker file (port 80) and the default port which the service listens on (port 8080).
The docker run command port binding specification is hostPort:containerPort
. So a binding of 8080:80
results in an empty reply whilst 8080:8080
works.
So either the default port for the service should be altered to 80
or the exposed port in the Dockerfile changed to 8080
. The latter would likely be a better choice.