influxdata / influxdata-docker

Official docker images for the influxdata stack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automated Setup leaves a file behind preventing startup in influxdb:latest

aidanmorgan opened this issue · comments

I am trying to create an empty influxdb running in docker on my m2 macbook pro which is failing with a strange error. The database appears to do the automated setup bootstrapping, and restart the instance, but then fails with the following error:

sed: couldn't open temporary file /etc/influxdb2/sedPav3Lj: Permission denied

The command I am running from a terminal is:

docker run -it -p 8086:8086 \
      -v $PWD/influx-data:/var/lib/influxdb2 \
      -v $PWD/influx-config:/etc/influxdb2 \
      -e DOCKER_INFLUXDB_INIT_MODE=setup \
      -e DOCKER_INFLUXDB_INIT_USERNAME=admin \
      -e DOCKER_INFLUXDB_INIT_PASSWORD=password \
      -e DOCKER_INFLUXDB_INIT_ORG=test-org \
      -e DOCKER_INFLUXDB_INIT_BUCKET=test-bucket \
      -e DOCKER_INFLUXDB_INIT_RETENTION=3d \
      -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-super-secret-auth-token \
      influxdb:latest

I've attached the logs generated by the process here: logs.txt

I can make the instance boot by running chmod +rwx influx-config/sedKfbRwb and then running the same docker command again.

I've tried the same script on a x86 box running ubuntu in a GH Codespace, and it works initialises and runs as expected, so I suspect this issue is specific to docker on a m2 macbook pro.