0

Since there are issues with collations in the default alpine-based timescaledb images, I tried to use the bitnami-image. But I get an error on startup.

docker run ^
-p 5432:5432 ^
-v tsdb-bitnami:/bitnami/postgresql ^
--env POSTGRES_USER=tsdbu ^
--env POSTGRES_DB=tsdbu ^
--env POSTGRES_PASSWORD=tsdbu ^
--name timeseriesdb ^
timescale/timescaledb:1.5.0-pg11-bitnami

This fails with:

ERROR:  permission denied to create extension "timescaledb"
HINT:  Must be superuser to create this extension.

Is there some other parameter that we must pass? i.e. I've tried POSTGRESQL_POSTGRES_PASSWORD (ref= bitnami postgres docs), but this did also not work.

Versions:

  • Windows 10 64-bit
  • Docker version 19.03.4, build 9013bf5
  • Timescale container: timescale/timescaledb:1.5.0-pg11-bitnami

Full Output:

postgresql 12:31:34.41
postgresql 12:31:34.41 Welcome to the Bitnami postgresql container
postgresql 12:31:34.41 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-postgresql
postgresql 12:31:34.41 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-postgresql/issues
postgresql 12:31:34.42 Send us your feedback at containers@bitnami.com
postgresql 12:31:34.42
postgresql 12:31:34.42 INFO  ==> ** Starting PostgreSQL setup **
postgresql 12:31:34.45 INFO  ==> Validating settings in POSTGRESQL_* env vars..
postgresql 12:31:34.46 INFO  ==> Initializing PostgreSQL database...
postgresql 12:31:34.46 INFO  ==> postgresql.conf file not detected. Generating it...
postgresql 12:31:34.47 INFO  ==> pg_hba.conf file not detected. Generating it...
postgresql 12:31:35.67 INFO  ==> Starting PostgreSQL in background...
postgresql 12:31:36.14 INFO  ==> Creating user tsdbu
postgresql 12:31:36.15 INFO  ==> Grating access to "tsdbu" to the database "tsdbu"
postgresql 12:31:36.16 INFO  ==> Configuring replication parameters
postgresql 12:31:36.18 INFO  ==> Configuring fsync
postgresql 12:31:36.18 INFO  ==> Loading custom scripts...
postgresql 12:31:36.19 INFO  ==> Loading user's custom files from /docker-entrypoint-initdb.d ...
postgresql 12:31:36.19 INFO  ==> Starting PostgreSQL in background...
ERROR:  permission denied to create extension "timescaledb"
HINT:  Must be superuser to create this extension.
postgresql 12:31:36.20 INFO  ==> Stopping PostgreSQL...
2
  • "It is possible to change the user that PostgreSQL will use to execute the init scripts. To do so, use the following environment variables" -- that maybe? – Philᵀᴹ Nov 6 '19 at 12:54
  • 1
    The POSTGRES_USER is documented by bitname to be a regular user, which indeed cannot install timescaledb. github.com/bitnami/… As a workaround for now, specify POSTGRES_USER to be postgres, that will work, afterwards you can create a database and user manually. Created an issue to have this addressed here: github.com/timescale/timescaledb-docker/issues/79 – Feike Steenbergen Nov 6 '19 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.