What do `docker compose up --build` and `-d` do?
⚡
Quick Answer
--build rebuilds images before starting; -d runs the stack detached in the background.
Detailed Answer
By default up reuses existing images; --build forces a rebuild after code changes. -d frees your terminal and runs services in the background (view logs with docker compose logs -f). Combine as up -d --build for a fresh detached start.
💡
Interview Tip
Mention logs -f to follow a detached stack.
docker-composeclibuild