Interactive vs Detached Containers

LEVEL 0

The Problem

Some containers run a quick task and exit (like hello-world). Some containers run services that should stay running (like a web server). Some containers you want to interact with (like a shell).

How do you control this? How do you run containers in the background? How do you attach to them?