Containers are isolated by default. Networking and volumes enable communication and data persistence.
Networking modes:
- bridge: Default. Containers on same bridge can communicate
- host: Container shares host's network stack
- none: No networking
Volumes:
- Named volumes:
docker volume create mydata - Bind mounts: Map host directory to container
Interview tip: Know that container filesystems are ephemeral. Without volumes, data is lost when a container stops.