systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.46k stars 230 forks source link

Improves docker setup for basic usage to get started more easily #713

Closed daniel-j-h closed 5 months ago

daniel-j-h commented 5 months ago

Hi! :wave: Finally giving your project a try and because it's 2024 ain't nobody got time for building C++ from source, I checked out the docker images. In this changeset I make various improvements to the docker setup

  1. Using the stable debian bookworm as a base image as bullseye is outdated
  2. Not installing the development libraries with the tilemaker binary as they're only needed for building
  3. Compiling in parallel so that the docker build doesn't take 10+ minutes to build
  4. Adding a default command of --help so that if folks do docker run they get to see the tilemaker help
  5. Updated the docker readme and added a usage section in the default readme to use docker by default

I would highly recommend defaulting to telling users to just use the docker image and not having to compile tilemaker from source. There are so many compilation problems caused by dependencies to install, compiler and linker versions, and so on.

Just from a first look

If we could dumb down the getting started instructions to

docker run .. tilemaker input.pbf --output output.pbf

that would make it easier for users and hopefully less likely for us to get support tickets.

daniel-j-h commented 5 months ago

FYI There are a few related docker PRs I'm seeing

and right now it looks like we're only pusblishing a single master tag

systemed commented 5 months ago

This is great - thank you!

I know practically nothing about docker - the support that we have so far is entirely down to other contributors. So I'm very happy to merge this but I may be leaning on you and others for support in the future.

it's 2024 ain't nobody got time for building C++ from source

Call me old-school 😉 (but also it's seriously fast on Apple silicon...).

daniel-j-h commented 5 months ago

Got it, I believe it's fair to say that Docker will not go away so can recommend looking into it.

In the context of native projects like tilemaker the benefit I see

If you want to give this PR a try locally

docker build -t tilemaker .
docker run -it --rm tilemaker

I just rebased against master and added the tilemaker binary to PATH so https://github.com/systemed/tilemaker/pull/465 can be closed, too.

Like a said in https://github.com/systemed/tilemaker/pull/713#issuecomment-2086138281 in the future a second iteration would be publishing not just a single tilemaker docker image but tagging them e.g. by date or version or commit hash. This can be a follow-up pull request.

Happy to get this in?

systemed commented 5 months ago

Definitely - thanks!

leonardehrenfried commented 4 months ago

Now that this one is also merged, would it be possible to take a look at https://github.com/systemed/tilemaker/pull/685 ?