versatiles-org / versatiles-rs

VersaTiles - A toolbox for converting, checking and serving map tiles in various formats.
https://versatiles.org
MIT License
57 stars 2 forks source link

Getting started with Docker #28

Closed hinricht closed 1 year ago

hinricht commented 1 year ago

I'm trying to get started using Docker locally and am happy to provide a tutorial once I succeed. I'd like to start with little extra setup as possible (i.e. without building the additional image), to get a first impression.

Iiuc, I should be able to start versatile with

docker run --rm versatiles/versatiles:latest-alpine versatiles serve '[osm]https://storage.googleapis.com/versatiles/download/planet/europe/germany/germany-20230226.versatiles'

But it fails with:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
    ^bytes (\d+)-(\d+)/\d+$
     ^
error: Unicode-aware case insensitivity matching is not available (make sure the unicode-case feature is enabled)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)', /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/versatiles-0.5.3/src/containers/versatiles/abstract_readers/data_reader_http.rs:64:18
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Passing -e RUST_BACKTRACE=full doesn't provide any more useful information.

Maybe I'm doing sth wrong here, can you please point me in the right direction ?

MichaelKreil commented 1 year ago

This was a bug that I fixed today with v0.5.5. Can you retry with the current version?

Surprisingly, it was not noticed by cargo test, even though the tests cover the code. Probably something to do with it being wrapped around a lazy_static! macro.

hinricht commented 1 year ago

Thanks, pulling the latest image fixed the issue:

$ docker run --rm versatiles/versatiles:latest-alpine versatiles serve '[osm]https://storage.googleapis.com/versatiles/download/planet/europe/germany/berlin-20230101.versatiles'  
   /tiles/osm/*                    <-  https://storage.googleapis.com/versatiles/download/planet/europe/germany/berlin-20230101.versatiles
server starts listening on 127.0.0.1:8080

Btw, I was also able to serve a local versatiles file with docker run -v $(pwd)/data/:/data --rm versatiles/versatiles:latest-alpine versatiles serve '/data/berlin-20230101.versatiles' :+1: