mikeizbicki / cmc-csci143

big data course materials
40 stars 76 forks source link

Postgres container immediately exits #570

Closed eoinoconnell04 closed 6 months ago

eoinoconnell04 commented 6 months ago

Hi, I'm working on my final project but I cannot get my Postgres docker containers to run.

When I run docker ps -a I can see that the container exited immediately after I created it.

When I run docker container logs CONTAINER_ID I get the following output:

PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-05-09 03:54:39.507 UTC [1] FATAL:  database files are incompatible with server
2024-05-09 03:54:39.507 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 16.2 (Debian 16.2-1.pgdg110+2).

Does anybody know why I'm getting this issue? I imagine it could be with my docker.compose.yml, schema, or Dockerfile, but I cannot find any issues.

Thanks