Hi @junqiu, hi @Navneet, now I’ll provide all my research with virtual machines
There is Debian 12, not 11, but nothing changes in this case, all steps will be same as on Debian 11
I use only official documentation (Using the self-host maps server - OpenSearch documentation) and for maps in this example will be used this map (https://maps.opensearch.org/offline/planet-osm-default-z0-z8.tar.gz).
First step is pulling image. On isolated environment we can docker pull
, docker save
maps server docker image on computer with internet access and then docker load
on local machine without internet connection, it’s not a problem.
Second step is loading selected maps. This will more complicated but ok.
docker run \
-e DOWNLOAD_TILES=https://maps.opensearch.org/offline/planet-osm-default-z0-z8.tar.gz \
-v tiles-data:/usr/src/app/public/tiles/data/ \
opensearch/opensearch-maps-server \
import
In this command we see url path to our map because this docker container download map with curl
command. In isolated environment this can be passed by starting http server with command python3 -m http.server
in folder where we transfered our selected map from computer with internet connection. And our command will be like that:
docker run \
-e DOWNLOAD_TILES=http://<our_local_ip>/planet-osm-default-z0-z8.tar.gz \
-v tiles-data:/usr/src/app/public/tiles/data/ \
opensearch/opensearch-maps-server \
import
If we run this command downloading will be passed.
Figure_1! I’ll post this in next message because of limitations
This ip just default for docker network.
Third step is run docker to serve with command run
:
Figure_2! I’ll post this in next message because of limitations
As we can see all starts properly without errors and now we go to our localhost:8080
Figure_3! I’ll post this in next message because of limitations
With blank page :)))
This happens because off loading js library (let’s enter ctrl+u on page)
And if you want more you can go to debugger on previous page
Figure_4! I’ll post this in next message because of limitations
As we can see “self hosted maps server” needs internet connection. And I guess my case also can interesting for other people and we can help each other.
In the end of this message I’ll write some troubleshoot things I tried.
I tried rewrite this demo.html
page to load libraries from my local machine with <script src="http://localhost:8000/maplibre-gl.js"></script>
also serving this with python3 -m http.server
but this not works for me. And a tried to rewrite demo.html
to load libraries from docker volume docker run -v path:path
this is also not works for me.
But I’m think that this tries just attempts to fast work and not reliable at all.