准备容器 pkg/domain/infra/abi/containers.go ContainerRun
pkg/specgen/generate/container.go . CompleteSpec
pkg/specgen/generate/container_create.go MakeContainer
-> github.com/containers/common/libimage/runtime.go LookupImage 查询镜像信息,得到镜像id
-> pkg/specgen/generate/oci.go SpecGenToOCI 准备OCI配置文件
-> libpod/runtime_ctr.go Runtime.newContainer 准备容器/
—> libpod/runtime_ctr.go Runtime.setupContainer
—-> libpod/container_internal.go Container.setupStorage
——> libpod/storage.go �CreateContainerStorage :
——-> github.com/containers/storage/store.go CreateContainer 准备容器文件系统
ROLayerStores 对于有AdditionalImageStores的driver,每个AdditionalImageStores都对应一个ROLayerStore,对应多个layer
ROImageStore 对于有AdditionalImageStores的driver,每个AdditionalImageStores都对应一个ROImageStore,对应多个镜像
ImageStore 普通的镜像store,优先从这里查
——-> “created container xxxxx”
——-> container “7eb1b23fd414080a1980990161955c4fad7fb522a3ed54234a94d6c38e72f597” has work directory “/var/lib/containers/storage/overlay-containers/7eb1b23fd414080a1980990161955c4fad7fb522a3ed54234a94d6c38e72f597/userdata”
——-> container “7eb1b23fd414080a1980990161955c4fad7fb522a3ed54234a94d6c38e72f597” has run directory “/var/run/containers/storage/overlay-containers/7eb1b23fd414080a1980990161955c4fad7fb522a3ed54234a94d6c38e72f597/userdata”
—-> libpod/container_internal.go Container.newContainerEvent 生成event:unable to write pod event
�
libpod/container_internal.go Container.initAndStart
-> libpod/container_internal.go Container.prepare
�—> libpod/container_internal.go Container.mountStorage
—-> libpod/container_internal.go Container.mount
——> MountContainerImage: 准备可读写的rootfs mounted container “7eb1b23fd414080a1980990161955c4fad7fb522a3ed54234a94d6c38e72f597” at “/var/lib/containers/storage/overlay/42203f76b6652d9c82a8b242b83041d9cecfd91428563f244af6e4bbe3f4733a/merged”
�—> Created root filesystem for container 7eb1b23fd414080a1980990161955c4fad7fb522a3ed54234a94d6c38e72f597 at /var/lib/containers/storage/overlay/42203f76b6652d9c82a8b242b83041d9cecfd91428563f244af6e4bbe3f4733a/merged
—> libpod/container_internal.go Container.resolveWorkDir: Workdir \”/\” resolved to host path
-> libpod/container_internal.go Container.init
—> libpod/container_internal.go Container.generateSpec
—-> libpod/container_internal.go Container.getOCICgroupPath: Setting CGroup path for container
�—-> libpod/container_internal.go Container.setupOCIHooks: reading hooks from
—> libpod/container_internal.go Container.saveSpec: Created OCI spec for container
�