How a container isolates code
The Linux kernel gives each container its own view of the file system, the network and the process list, and limits the CPU and memory it can use. All containers on a machine still call the same kernel.
What that means for a sandbox
A container starts fast and runs any OCI image, so an existing Docker image works as a sandbox. The shared kernel is the trade-off. A microVM or a user-space kernel puts one more layer between the code and the host.
Referenceopencontainers.org