feat(deploy): introduce proto for InspectImage and InspectRemoteImage methods

This commit is contained in:
Pavel Sviderski
2025-03-20 21:36:41 +10:00
parent 4172cb826f
commit 2ad098c612
3 changed files with 439 additions and 71 deletions
+22 -2
View File
@@ -15,8 +15,10 @@ service Docker {
rpc ListContainers(ListContainersRequest) returns (ListContainersResponse);
rpc RemoveContainer(RemoveContainerRequest) returns (google.protobuf.Empty);
rpc PullImage(PullImageRequest) returns (stream JSONMessage);
// TODO: implement InspectImageFromRegistry to resolve image name to digest and supported platforms using
// the configured Docker auth.
rpc InspectImage(InspectImageRequest) returns (InspectImageResponse);
// InspectRemoteImage returns the image metadata for an image in a remote registry using the machine's
// Docker auth credentials if necessary.
rpc InspectRemoteImage(InspectRemoteImageRequest) returns (InspectRemoteImageResponse);
}
message CreateContainerRequest {
@@ -89,3 +91,21 @@ message JSONMessage {
// JSON serialized jsonmessage.JSONMessage.
bytes message = 1;
}
message InspectImageRequest {
string id = 1;
}
message InspectImageResponse {
// JSON serialized types.ImageInspect.
bytes response = 1;
}
message InspectRemoteImageRequest {
string id = 1;
}
message InspectRemoteImageResponse {
// Raw manifest data (JSON).
bytes manifest = 1;
}