Does the initial setup of the influxdb docker container support docker secrets?

Hello,
i’m currently trying to deploy a influxdb2 container on my already existing docker swarm environment.
By reading the info on the dockerhub page & documentations i was able to create a docker compose file which sets up my container and initializes it on the first run time with an initial user, pass, org and bucket via the following variables:

  • DOCKER_INFLUXDB_INIT_USERNAME
  • DOCKER_INFLUXDB_INIT_PASSWORD
  • DOCKER_INFLUXDB_INIT_ORG
  • DOCKER_INFLUXDB_INIT_BUCKET
  • DOCKER_INFLUXDB_INIT_RETENTION

Now i have two questions regarding this setup.

  1. Does the docker influxdb container also support using docker secrets when setting up with environment variables (as i don’t really like plain text passwords in my docker-compose.yaml or .env file)?
  2. I’m a little bit confused by needing to set up an initial user + org + bucket as this isn’t really what i want to achieve during setup. Is there a way to just initialize some sort of admin user on setup that i then use for creating other users, buckets etc. (because a bucket for my initial ‘admin’ user would kind of be waste)?

Would really appreciate any help :slight_smile:

Hello @Panda,

  1. Please see Use Docker Secrets for Credentials · Issue #328 · influxdata/influxdata-docker · GitHub
  2. The super-user/admin can delete your initial bucket. But setting up the the system’s initial bucket is required.
1 Like

Thank you very much for your reply.

To 1:
I don’t really get what you are trying to tell me with this.
So this is basically a feature that’s requested since 2019 and nobody implemented it yet?
Do/can we have to implement that on our own based of the linked content from rafi0101?

To 2:
Okey, i guess this is by design. I was just curious why an initial bucket is neccessary as you probably always want to create a separate bucket + dedicated user per service (which then uses the influxdb bucket). This in return would mean never storing anything in the initial bucket itself (besides data that gets stored in there by design).