From c4c90e9cec1b3f3cc5aa652e4e9155f6a2e687aa Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 29 Nov 2013 17:24:30 -0800 Subject: [PATCH] Add hostconfig to container inspect --- api.go | 5 ++++- api_params.go | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api.go b/api.go index da16044410..70349bd157 100644 --- a/api.go +++ b/api.go @@ -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 { diff --git a/api_params.go b/api_params.go index 8d65d475ce..a1bdd3e147 100644 --- a/api_params.go +++ b/api_params.go @@ -118,6 +118,10 @@ type ( Resource string HostPath string } + APIContainer struct { + *Container + HostConfig *HostConfig + } ) func (api APIImages) ToLegacy() []APIImagesOld {