daemon.create
が実際の処理
-
オプション情報をもとにコンテナを作成 https://sourcegraph.com/github.com/moby/moby@063bd4c96ae633a1aa830b7f8a646b689c14e5c8/-/blob/daemon/create.go#L107 https://sourcegraph.com/github.com/moby/moby@063bd4c96ae633a1aa830b7f8a646b689c14e5c8/-/blob/daemon/create.go#L156
-
コンテナを作成したら、レイヤーのファイルシステムを作成(Overlayfs?) https://sourcegraph.com/github.com/moby/moby@063bd4c96ae633a1aa830b7f8a646b689c14e5c8/-/blob/daemon/create.go#L191
実際のファイルシステムを作成するのはドライバが行う https://sourcegraph.com/github.com/moby/moby@063bd4c96ae633a1aa830b7f8a646b689c14e5c8/-/blob/layer/layer_store.go#L556
- homeディレクトリとチェックポイントディレクトリを作成 https://sourcegraph.com/github.com/moby/moby@063bd4c96ae633a1aa830b7f8a646b689c14e5c8/-/blob/daemon/create.go#L199-203
-
daemon.generateIDAndName
でIDとNameを生成 https://sourcegraph.com/github.com/moby/moby@063bd4c96ae633a1aa830b7f8a646b689c14e5c8/-/blob/daemon/container.go#L136 -
container.NewBaseContainer
でベースとなるコンテナ構造体を作成 https://sourcegraph.com/github.com/moby/moby@063bd4c96ae633a1aa830b7f8a646b689c14e5c8/-/blob/daemon/container.go#L191