Open aconital opened 3 years ago
I got this error as well while trying to run v3.1.1. I also tried running the same command with v3.1.0, and even though it didn’t give any explicit error messages during start up the viewer wouldn’t even open up on the designated port. The same command was working properly with V3.0.0 though.
Try to use -u 0
in order to run it as root :
docker run --rm -u 0 -it -v $(pwd):/data -p 8080:80 maptiler/tileserver-gl
This works perfectly
Do we need to run it as root though? Previous versions were working fine.
It runs as root inside the container only. They are trying to bind to the port 80 as a non root user which is never gonna work unless the user is a sudoer. For me, it's a regression that needs to be fixed by maptiler. The solution I suggested is only a work around.
I would suggest running the container on another port instead of the default 80. I use this in my Kubernetes manifest:
- name: tileserver
image: maptiler/tileserver-gl
args: ["-p", "8080", "--verbose", "-c", "/var/config/<my_config>.json"]
In Compose:
tileserver:
image: maptiler/tileserver-gl
ports:
- "8080:8080"
volumes:
- "$PWD/data:/data"
- "$PWD/tileserver/config:/var/config:ro"
- "$PWD/tileserver/static:/var/static:ro"
command: -p 8080 --verbose -c /var/config/<my_config>.json
In Docker Run:
docker run --rm -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl -p 8080 --verbose
Running as root is not necessary then.
I had the same problem and the solution from @StephanZaat worked fine! I use tileserver gl on Dokku and I added this to my Dockerfile
:
EXPOSE 8080
CMD ["-p", "8080", "--verbose"]
Basically the solution above but for a Dockerfile.
Try to use
-u 0
in order to run it as root :docker run --rm -u 0 -it -v $(pwd):/data -p 8080:80 maptiler/tileserver-gl
This works perfectly
Thanks for this workaround, it works just fine, but can you tell me how do I write "-u 0" in docker-compose file?
I feel like we should introduce some param to disable the --user
docker option. This way if the user wants to run all their docker images as root, they can. This might also help solve the issue some Mac users have reported with performance using shared volumes.
We had the same issue in some environments. We are not completely sure when it occurs but contributing factors seem to be
we have changed the internal docker port from 80 to 8080, so I think this issue should be resolved.
Note, the ports in the command have changed from 8080:80 to 8080:8080 due to this change, starting in v4.2.0
docker run --rm -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl
I have a simple ubuntu server and when I run the following command:
docker run --rm -it -v $(pwd):/data -p 8080:80 maptiler/tileserver-gl
I get this error:I tried running it with sudo as well but same thing. I had no issue running the same command on the same server last week.