(hostConfig *container.HostConfig)
| 832 | } |
| 833 | |
| 834 | func cloneContainerHostConfig(hostConfig *container.HostConfig) *container.HostConfig { |
| 835 | if hostConfig == nil { |
| 836 | return &container.HostConfig{} |
| 837 | } |
| 838 | item := *hostConfig |
| 839 | if len(hostConfig.Binds) != 0 { |
| 840 | item.Binds = append([]string(nil), hostConfig.Binds...) |
| 841 | } |
| 842 | if len(hostConfig.DNS) != 0 { |
| 843 | item.DNS = append([]string(nil), hostConfig.DNS...) |
| 844 | } |
| 845 | if len(hostConfig.ExtraHosts) != 0 { |
| 846 | item.ExtraHosts = append([]string(nil), hostConfig.ExtraHosts...) |
| 847 | } |
| 848 | if len(hostConfig.Mounts) != 0 { |
| 849 | item.Mounts = append([]mount.Mount(nil), hostConfig.Mounts...) |
| 850 | } |
| 851 | return &item |
| 852 | } |
| 853 | |
| 854 | func stepRestoreContainerMounts(recoverCtx *containerRecoverContext) error { |
| 855 | currentContainer := recoverCtx.createdContainerID |
no outgoing calls
no test coverage detected