File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,15 @@ func Status() (v1.DockerStatus, error) {
108
108
return v1.DockerStatus {}, err
109
109
}
110
110
111
- return docker .StatusFromDockerInfo (* podmanInfo )
111
+ status , err := docker .StatusFromDockerInfo (* podmanInfo );
112
+ if err != nil {
113
+ return v1.DockerStatus {}, err
114
+ }
115
+
116
+ status .Version , _ = VersionString ()
117
+ status .APIVersion , _ = APIVersionString ()
118
+
119
+ return status , nil
112
120
}
113
121
114
122
func GetInfo () (* dockersystem.Info , error ) {
@@ -127,6 +135,16 @@ func VersionString() (string, error) {
127
135
return version .Version , nil
128
136
}
129
137
138
+ func APIVersionString () (string , error ) {
139
+ var version dockertypes.Version
140
+ err := apiGetRequest ("http://d/v1.0.0/version" , & version )
141
+ if err != nil {
142
+ return "Unknown" , err
143
+ }
144
+
145
+ return version .APIVersion , nil
146
+ }
147
+
130
148
func InspectContainer (id string ) (dockertypes.ContainerJSON , error ) {
131
149
var data dockertypes.ContainerJSON
132
150
err := apiGetRequest (fmt .Sprintf ("http://d/v1.0.0/containers/%s/json" , id ), & data )
You can’t perform that action at this time.
0 commit comments