I'm sorry for the noob question. I try to run a PostgreSQL database in a container for tests. The commands:
docker create --name container-name -p 5432:5432 postgres
docker start container-name
Both commands work but when I check with
docker ps -a
It says, that the container stopped right after the start with exit code 1.
What am I doing wrong?
docker logs container-namesay anything? I might just rundocker runrather than splittingdocker createanddocker start, but it shouldn't make a difference here.docker logs container-name. I can solve it now myself! I'll write the answer as a separate answer. Thank you so much!!