← All Kali Issues
Docker

Container exits immediately

C Configuration High

🔴 Error Message

Container exits with code 0 or 1 right after start

📖 What This Means

No foreground process keeping container alive.

🔧 Step-by-Step Fix

  1. Check logs: docker logs container_id
  2. Run interactive: docker run -it image /bin/bash
  3. Add CMD or ENTRYPOINT to Dockerfile