mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 13:11:30 +00:00
Expose old config field for api < 1.19
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
This commit is contained in:
@@ -1141,6 +1141,14 @@ func (s *Server) getContainersByName(version version.Version, w http.ResponseWri
|
||||
return fmt.Errorf("Missing parameter")
|
||||
}
|
||||
|
||||
if version.LessThan("1.19") {
|
||||
containerJSONRaw, err := s.daemon.ContainerInspectRaw(vars["name"])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return writeJSON(w, http.StatusOK, containerJSONRaw)
|
||||
}
|
||||
|
||||
containerJSON, err := s.daemon.ContainerInspect(vars["name"])
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user