概要
docker compose up -d
で起動したコンテナがRestarting
から抜け出せなくなったので対策をまとめる
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bb79284b1635 hasura/graphql-engine:v2.9.0 "graphql-engine serve" About a minute ago Restarting (1) Less than a second ago hasura-postgress-graphql-engine-1
17e57dc1b6c4 postgres:12 "docker-entrypoint.s…" About a minute ago Restarting (1) 2 seconds ago hasura-postgress-postgres-1
対策
# Volumeごと消し去る
docker compose down -v
# 再度起動する
docker compose up -d
# 正常に起動できる
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8255c7a4297f hasura/graphql-engine:v2.9.0 "graphql-engine serve" 4 seconds ago Up 2 seconds 0.0.0.0:8080->8080/tcp hasura-postgress-graphql-engine-1
1578783e7786 postgres:12 "docker-entrypoint.s…" 4 seconds ago Up 3 seconds 5432/tcp hasura-postgress-postgres-1