最后让我们启动一个容器:
$ docker run --name foo --rm -d --memory='512MB' --cpus='0.5' nginx
探索容器的 namespace
首先我们来看一下,当容器启动后,哪些隔离原语(primitives)被创建了:
1 # Look up the container in the process tree.
2 $ ps auxf
3 USER PID ... COMMAND
4 ...
5 root 4707 /usr/bin/containerd-shim-runc-v2 -namespace moby -id cc9466b3e...