Montag, 30. Mai 2016

Docker InfluxDB: Create Container with HTTP Authentictation

The official Docker InfluxDB container will not start with authentication. In InfluxDB 0.13.0 the ability to control the config via Environment Variables was added. The easiest way to create a container with http authentication and creating an admin user is:

Create Container and set Admin User and Password

# Create temp Container
docker run -d \
--name test-influx \
-p 8083:8083 -p 8086:8086 \

# Create admin user in InfluxDB
docker exec -ti test-influx \
/usr/bin/influx -execute "CREATE USER admin WITH PASSWORD 'pass' WITH ALL PRIVILEGES; SHOW USERS"

Accessing the InfluxDB Console from Shell

The influx console has to be accessed with username and password from now on.
docker exec -ti test-influx \
/usr/bin/influx -username 'admin' -password 'pass'

Bug: Empty password

There is a bug right now with leaving the password empty, to ge a prompt: [Bug] Empty Password for Prompt not working (/usr/bin/influx) #6746

Keine Kommentare:

Kommentar veröffentlichen