blacktop/docker-elasticsearch-alpine

Change default credentials on startup

Closed this issue · 5 comments

Is there a way to change the default credentials during startup? For example in the official postgres image I could change the default credentials by passing environment variables, e.g. POSTGRES_USER and POSTGRES_PASSWORD. Great work on this image btw.

Issue #1 kind of explains how you would do that

I assume you mean the x-pack enabled image?

I have that ability in my elk image here - https://github.com/blacktop/docker-elastic-stack/blob/master/docs/change-pass.md

It looks like elasticsearch is changing the way they deal with passwords in x-pack via a new command:

echo "$ELASTIC_PASSWORD" | bin/elasticsearch-keystore add -x 'bootstrap.password'

however, usually you would have elastic only accessible from a private network and would hit it from your app using it as the db backend or via kibana with a x-pack password or nginx in front of it.

I don't think I am using the x-pack enabled image since this has the latest tag.

Using ELASTIC_PASSWORD now works with the x-pack images