refactor use of container struct from daemon Upstream-commit: aaa8cae34537eb9bddacacc8bce61c91ca76d7d2 Component: engine