pelias / docker

Run the Pelias geocoder in docker containers, including example projects.
MIT License
315 stars 218 forks source link

fix: Support arm Macs by creating dockerfile for elasticsearch 7.10.2 #263

Closed miles-grant-ibigroup closed 1 year ago

miles-grant-ibigroup commented 3 years ago

I was setting up Pelias today on an arm Mac and ran into some problems with the Elasticsearch image. Some research told me that version 7.10.2 plays nicely with Docker on arm, and I confirmed that to be true. I'm not sure what your process is for updating Elasticsearch, but I created an image based on the Dockerfile in this PR and I have Pelias up and running on my arm Mac!


Here's the reason for this change :rocket:

Pelias wasn't running properly on an arm Mac.

More specifically, was getting the error Error: could not find libjava.so from within the container after running pelias elastic start.


Here's what actually got changed :clap:

Created a new Elasticsearch image.


Here's how others can test the changes :eyes:

Try to create a new Pelias instance on both Intel and arm computers, and check that everything still works!

orangejulius commented 2 years ago

Hi @miles-grant-ibigroup, Thanks for this! I have an M1 Apple myself, and definitely noticed Elasticsearch does not work in Docker as we currently have it set up.

To be honest, we are rather conservative when it comes to upgrading Elasticsearch in general. The upgrades (even between minor versions) often lead to things like performance or quality changes, and it's hard to make sure we won't break something for someone with a unique setup. But we do want to support as many platforms as possible, and falling behind on versions has its own issues.

I also haven't really used Docker much on the new Mac, since it seems to have poor performance, not a lot of images support ARM natively yet, and it kills the incredible battery life (the whole reason I got the laptop in the first place!). Anyway I'll try to test this soon :)

miles-grant-ibigroup commented 2 years ago

Hey,

Thanks so much for taking a look! Battery life running Docker is definitely not what it was without Docker, but I was still able to set up Pelias on the Portland Metro area from scratch with interpolation and only used about 50% of battery!

I'm just happy the fix is known and thanks again for maintaining Pelias! Really impressive project.