Contributing to Elasticsearch using a Docker Image

Hi,

I've just had my first successful contribution to the Elasticsearch codebase merged, and I thought I would share a Docker image that can be used to ease the development process.

The actual contribution I made was actually very small, however the process to get to the point where I could get the change merged was somewhat painful.

One of the main requirements for getting a change merged into the source is that all the tests must pass - and there are A LOT of them, and they cover every supported version of Elasticsearch.

This means, you will need to have 3 versions of the Java SDK installed (Java7, Java8 and Java10), with specific JAVA_HOME environment variables set for each. This can be non-trivial on some development environments as older versions are deprecated, and the newer versions may not be available yet on your platform.

You will also need to have a non-root elastic user setup for the integration tests to be able to spin up actual Elasticsearch clusters.

I work on a Mac usually, and meeting these requirements turned out to be a pain, and besides which, i really didn't want 3 versions of Java kicking around on my machine.

For this reason, I have created a Docker image, available on Docker hub, which should significantly lower this barrier to entry, and have you up and running and able to contribute in literally minutes.

Please check out the Docker image here: https://hub.docker.com/r/tonydillon/elasticsearch-contributor/

There are a few instructions for how to get up and running, and some sample commands to build and check the source code.

I hope this helps somebody get started contributing!

Many thanks,
Tony

3 Likes

Thanks for sharing @tony-dillon!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.