Problem
I wanted to experiment with some postgres 15 localization changes. So i changed the postgresql.conf
like lc_time
from US to German in my docker container.(These changes work on my other VM cluster). Afterwards i wanted i restarted the postgres15 container.
Unfortunately, the container gets stuck on “restart”.
Looking into the container logs:
2024-10-24 15:02:36.590 CEST [1] LOG: invalid value for parameter "lc_time": "de_DE.UTF-8"
2024-10-24 15:02:36.590 CEST [1] FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors
Question
So all have to do is to set the old values back in the postgres config. Unfortunately starting the container automatically starts the postgres cluster.
Question: Is there some kind of “safe mode” to start the container blank? Without starting the whole postgres tail?
I guess i have to compose the whole container again?
How can I start the Docker container without the other services starting automatically?
Overwrite the command and entrypoint. For example I typically use:
docker run -ti --rm --entrypoint= image bash -l