1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Add hostconfig to container inspect

This commit is contained in:
Michael Crosby 2013-11-29 17:24:30 -08:00
parent 3ed0ff85f5
commit c4c90e9cec
2 changed files with 8 additions and 1 deletions

5
api.go
View file

@ -874,7 +874,10 @@ func getContainersByName(srv *Server, version float64, w http.ResponseWriter, r
return fmt.Errorf("Conflict between containers and images")
}
return writeJSON(w, http.StatusOK, container)
container.readHostConfig()
c := APIContainer{container, container.hostConfig}
return writeJSON(w, http.StatusOK, c)
}
func getImagesByName(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {

View file

@ -118,6 +118,10 @@ type (
Resource string
HostPath string
}
APIContainer struct {
*Container
HostConfig *HostConfig
}
)
func (api APIImages) ToLegacy() []APIImagesOld {