Skip to content

Issue #5 make elastisearch run as a normal user. #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2015
Merged

Issue #5 make elastisearch run as a normal user. #6

merged 1 commit into from
Mar 24, 2015

Conversation

ggtools
Copy link
Contributor

@ggtools ggtools commented Mar 12, 2015

  • Add a docker-entrypoint.sh script dropping root privileges when
    starting up elasticsearch. The script uses gosu to drop the
    permission
  • Replace CMD by ENTRYPOINT
  • Fix update.sh script to work with the new elastic.co site

Most update is shamelessly borrowed from PostgreSQL official image


COPY docker-entrypoint.sh /

ENTRYPOINT ["/docker-entrypoint.sh"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to see there still be a CMD ["elasticsearch"] here to make it clear what the default command is without having to look at the entrypoint script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that makes sense

@md5
Copy link
Contributor

md5 commented Mar 12, 2015

LGTM

&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& apt-get purge -y --auto-remove curl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java:7-jre already has curl installed from buildpack-deps:curl, so we can just use it 😄. Otherwise, this all looks great. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

- Add a docker-entrypoint.sh script dropping root privileges when
  starting up elasticsearch. The script uses `gosu` to drop the
  permission
- Add `ENTRYPOINT`, while keeping `CMD` for clarity
- Fix `update.sh` script to work with the new elastic.co site

Most update is shamelessly borrowed from PostgreSQL official image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants