A namespace is a Linux functionality that ensures the partitioning of OS resources is mutually exclusive. Namespaces provide a layer of separation between containers, which is the central principle behind containerization. The namespaces in Docker ensure that containers are portable and have no effect on the underlying host. PID, User, Mount, and Network are examples of namespaces that Docker currently supports.