I'm trying to run postresql with docker compose
version: "3.8"
services:
db:
image: postgres:14.1-alpine
restart: always
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
- POSTGRES_DB=test
ports:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
volumes:
db:
driver: local
When I then try to start it with docker compose up I get the following error:
db-1 | performing post-bootstrap initialization ... 2022-09-19 12:45:21.913 UTC [30] FATAL: zero-length delimited identifier at or near """" at character 12
db-1 | 2022-09-19 12:45:21.913 UTC [30] STATEMENT: ALTER USER ""test"" WITH PASSWORD E'"test"';
db-1 |
db-1 | child process exited with exit code 1
I have experimented with single quotes, double quotes, no quotes for the environment variables, but the issue persists. My understanding is that nothing that isn't in the docker-compose.yml can be affecting the database. There is no postgres running locally when I try to start this. What is causing the issue?
Edit: Docker compose version is
ā ~ docker compose version
Docker Compose version v2.10.2
Edit: Added the output of a non-printable character checker
