docker安装openmaptiles-server

偷懒,有没有现成的docker,开箱即用的地图服务器呢?


Docker挂载主机目录Docker访问出现Permission denied的解决办法 https://blog.csdn.net/rznice/article/details/52170085

2.临时关闭selinux:
setenforce 0

参考:这位博主很慷慨,还提供了离线地图的百度云下载地址!!
https://www.jianshu.com/p/fee8bf4f0c75

https://hub.docker.com/_/openmaptiles-openstreetmap-maps?tab=reviews

docker run --rm -it -p8080:80 klokantech/openmaptiles-server
能跑起来,但是提示下载数据文件,而且启动后丢失数据文件

下载速度很慢!

/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a “-c” argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching ’
2019-04-02 04:12:03,328 CRIT Supervisor running as root (no user in config file)
2019-04-02 04:12:03,328 INFO Included extra file “/etc/supervisor/conf.d/openmaptiles.conf” during parsing
2019-04-02 04:12:03,334 INFO Creating socket tcp://localhost:8081
2019-04-02 04:12:03,337 INFO Closing socket tcp://localhost:8081
2019-04-02 04:12:03,354 INFO RPC interface ‘supervisor’ initialized
2019-04-02 04:12:03,354 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
2019-04-02 04:12:03,355 INFO supervisord started with pid 1
2019-04-02 04:12:04,360 INFO spawned: ‘wizard’ with pid 11
2019-04-02 04:12:04,363 INFO spawned: ‘xvfb’ with pid 12
2019-04-02 04:12:05,366 INFO success: wizard entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2019-04-02 04:12:05,366 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Starting OpenMapTiles Map Server (action: run)
Config file not found!
Starting installation…
Installation wizard started at http://:::80/
List of available downloads ready.

docker ps
docker containers ls

root@localhost ~]# docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bbe46358c5ed klokantech/openmaptiles-server “supervisord -n” About an hour ago Up About an hour (healthy) 0.0.0.0:8080->80/tcp distracted_ardinghelli
[root@localhost ~]# docker exec -it distracted_ardinghelli bash
root@bbe46358c5ed:/# cd /data
root@bbe46358c5ed:/data# ls -al
total 16128
drwxr-xr-x. 2 root root 79 Apr 2 05:20 .
drwxr-xr-x. 1 root root 39 Apr 2 04:20 …
-rw-r–r--. 1 root root 0 Nov 21 12:07 .omtms-default-data
-rw-r–r--. 1 root root 10565576 Apr 2 05:28 osm-2019-03-04-v3.9-asia_china.mbtiles

http://10.1.201.208:8080/

来安县:

http://192.168.1.135:8080/styles/klokantech-basic/#12/32.43335/118.42167
http://10.1.201.208:8080/styles/klokantech-basic/#12/32.43335/118.42167
http://10.1.201.208:8080/styles/osm-bright/#12/32.43335/118.42167

下载。将数据可以上传到linux上,然后在数据的当前目录运行

创建了空的data目录,比如/docker-data/openmaptiles-server/data
cd /docker-data/openmaptiles-server
–rm 貌似是启动后删除docker
docker run --name chinamap2017 -it -p8080:80 klokantech/openmaptiles-server

docker cp /docker-data/openmaptiles-server/data/osm-2017-07-03-v3.6.1-asia_china.mbtiles chinamap2017:/data
docker stop chinamap2017
docker start chinamap2017

Server vector map tiles
Mapbox SDK, native MVT client
Sever raster map tiles
Leaflet, OpenLayers, XYZ
Server map services
WMS and WMTS for QGIS or ArcGIS

docker exec -it chinamap2017 bash

docker命令集
https://blog.csdn.net/talkxin/article/details/83061973
ls /var/lib/docker/containers

==================================
find . -name mapbox.js
/usr/local/src/tileserver-gl/public/resources/mapbox.js
./usr/local/src/assets/styles/osm-bright
./usr/local/src/assets/styles_copy/osm-bright
./usr/local/src/tileserver-gl/node_modules/tileserver-gl-styles/styles/osm-bright

docker cp chinamap2017:/usr/local/src/tileserver-gl/public/resources/mapbox.js ./

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页