Browse code

Add hostconfig to container inspect

Michael Crosby authored on 2013/11/30 10:24:30
Showing 2 changed files
... ...
@@ -874,7 +874,10 @@ func getContainersByName(srv *Server, version float64, w http.ResponseWriter, r
874 874
 		return fmt.Errorf("Conflict between containers and images")
875 875
 	}
876 876
 
877
-	return writeJSON(w, http.StatusOK, container)
877
+	container.readHostConfig()
878
+	c := APIContainer{container, container.hostConfig}
879
+
880
+	return writeJSON(w, http.StatusOK, c)
878 881
 }
879 882
 
880 883
 func getImagesByName(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
... ...
@@ -118,6 +118,10 @@ type (
118 118
 		Resource string
119 119
 		HostPath string
120 120
 	}
121
+	APIContainer struct {
122
+		*Container
123
+		HostConfig *HostConfig
124
+	}
121 125
 )
122 126
 
123 127
 func (api APIImages) ToLegacy() []APIImagesOld {