containers.proto 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. syntax = "proto3";
  2. package com.docker.api.containers.v1;
  3. import "google/protobuf/empty.proto";
  4. option go_package = "github.com/docker/api/containers/v1;v1";
  5. service Containers {
  6. rpc List(ListRequest) returns (ListResponse);
  7. rpc Create(CreateRequest) returns (CreateResponse);
  8. rpc Start(StartRequest) returns (StartResponse);
  9. rpc Stop(StopRequest) returns (google.protobuf.Empty);
  10. rpc Kill(KillRequest) returns (google.protobuf.Empty);
  11. rpc Delete(DeleteRequest) returns (google.protobuf.Empty);
  12. rpc Update(UpdateRequest) returns (UpdateResponse);
  13. rpc Exec(ExecRequest) returns (ExecResponse);
  14. }
  15. message Container {
  16. string id = 1;
  17. string image = 2;
  18. string status = 3;
  19. uint64 cpu_time = 4;
  20. uint64 memory_usage = 5;
  21. uint64 memory_limit = 6;
  22. uint64 pids_current = 7;
  23. uint64 pids_limit = 8;
  24. repeated string labels = 9;
  25. }
  26. message CreateRequest {
  27. string id = 1;
  28. repeated string args = 2;
  29. repeated string env = 3;
  30. bool tty = 4;
  31. string image = 5;
  32. string hostname = 6;
  33. repeated string networks = 7;
  34. string snapshotter = 8;
  35. string logger = 9;
  36. string profile = 10;
  37. string restart_status = 11;
  38. repeated Mount mounts = 12;
  39. string working_dir = 13;
  40. repeated string labels = 14;
  41. }
  42. message Mount {
  43. string type = 1;
  44. string source = 2;
  45. string destination = 3;
  46. repeated string options = 4;
  47. }
  48. message CreateResponse {
  49. }
  50. message UpdateRequest {
  51. string id = 1;
  52. string image = 2;
  53. }
  54. message UpdateResponse {
  55. }
  56. message DeleteRequest {
  57. string id = 1;
  58. bool force = 2;
  59. }
  60. message StartRequest {
  61. string id = 1;
  62. string stream_id = 2;
  63. }
  64. message StartResponse {
  65. }
  66. message StopRequest {
  67. string id = 1;
  68. int64 signal = 2;
  69. }
  70. message ExecRequest {
  71. string id = 1;
  72. string stream_id = 2;
  73. repeated string args = 3;
  74. repeated string env = 4;
  75. bool tty = 5;
  76. string working_dir = 6;
  77. }
  78. message ExecResponse {
  79. }
  80. message KillRequest {
  81. string id = 1;
  82. int64 signal = 2;
  83. }
  84. message ListRequest {
  85. repeated string filters = 1;
  86. }
  87. message ListResponse {
  88. repeated Container containers = 1;
  89. }