Commit Graph

60 Commits

Author SHA1 Message Date
Guillaume Tardif 7cf7b00584 Add ResourceService definition and ACI NOOP implementation
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-14 15:40:24 +02:00
Ulysses Souza 660c7bbdcf Add command "volume inspect"
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-14 11:11:55 +02:00
Guillaume Tardif cfc490fd92 Update gRPC inspect result with HostConfig struct. Breaking changes in inspect API, but this is not used yet in VSCode Docker extension, and still in beta.
(Cf https://github.com/microsoft/vscode-docker/blob/master/src/docker/DockerServeClient/DockerServeUtils.ts)

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 18:05:52 +02:00
Guillaume Tardif b1edfb6507 Change inspect json output to group things a bit more nicely, and more like Moby json output
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 17:03:30 +02:00
aiordache f983686426 Change EnvVars property to Environment
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-02 09:51:09 +02:00
aiordache 11d4db6907 Add EnvVars property to the container proto and update unittest
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-01 14:36:03 +02:00
Ulysses Souza 277702dc6b Add argument support to run command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-09-30 15:34:22 +02:00
Guillaume Tardif b9d6c2e701 Add volume as a new served API, use `one of` in proto for context specific parameters, proxy volume creation
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-28 14:56:32 +02:00
Ulysses Souza b87f827120 Add gRPC layer to volumes management
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-09-28 10:06:18 +02:00
Guillaume Tardif 7807fb33cc API Metrics : send context type, not context name
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-28 09:01:30 +02:00
Chris Crone d154c41586 Update copyright
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-09-22 12:13:00 +02:00
Guillaume Tardif a71b2a39bd Add status field in API metrics
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-18 15:22:34 +02:00
Guillaume Tardif dae9ab7bb0
Merge pull request #627 from docker/fix_no_home
Fix context store when no home defined
2020-09-17 11:40:40 +02:00
Guillaume Tardif 3bf6a00a61 goimports
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-17 10:58:01 +02:00
Guillaume Tardif 9c6aead797 Allow running commands with HOME=“”.
Do not try to create ~/.docker before using CONFIG_DIR. HOME=“” will result in trying to use a relative .docker folder as default config folder, and if we cannot create the context store for any reason, try delegate to Moby CLI.

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-17 09:08:17 +02:00
Djordje Lukic 2570ebec86 Add interceptor for API metrics, ensure registered methods have a corresponding method set for metrics
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-09-15 17:16:10 +02:00
Guillaume Tardif 64a28f6636 Also move client => api/client
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-07 13:23:06 +02:00
Guillaume Tardif d06aa2827f Move containers, compose, secrets to /api
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-07 13:22:08 +02:00
Ulysses Souza 15066ce999 Add 'kill' command
- On ACI that's implemented as a stop,
since ACI does not implement a kill

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-09-04 02:57:54 +02:00
Chris Crone 4c6280b0e9 Rename docker/api -> docker/compose-cli
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-08-21 17:28:39 +02:00
Guillaume Lours 95de770e87 Update or add license header which are not valid
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-08-17 16:55:25 +02:00
Djordje Lukic 33758f0764 Add start to gRPC 2020-08-12 14:50:47 +02:00
Djordje Lukic 093a69136f Add --force to rm on ACI
If a container is running the user must force the removal of the
container.
2020-08-11 16:30:42 +02:00
Guillaume Tardif bc920b2e54 Add restartPolicyCondition to gRPC protos (run & inspect) 2020-08-05 10:05:00 +02:00
Christopher Crone 5ae94aceb6 server: Move to gotest.tools
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-08-03 09:54:18 +02:00
Djordje Lukic ef2d304762 Allow non-interactive exec on ACI
If the request is for a non-interactive exec we don't attach the stdin
when executing.
2020-07-09 11:47:22 +02:00
Djordje Lukic b146b2f391 Add the platform when returning a container over GRPC 2020-07-08 16:41:25 +02:00
Djordje Lukic 37f4c36c32 Use logrus for logging, not containerd's log 2020-06-29 15:02:05 +02:00
Ulysses Souza 1deb2b8b09 Integrate limits on inspect
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-29 10:32:28 +02:00
Djordje Lukic ad72c866cc Add license headers 2020-06-18 16:48:03 +02:00
Djordje Lukic 50c68ce4dd
Merge pull request #221 from rumpl/feat-context-metadata
Use the context from the metadata if it exists
2020-06-16 00:43:36 -07:00
Djordje Lukic a999f34b23 Use the context from the metadata if it exists 2020-06-16 09:43:09 +02:00
Ulysses Souza 1039c5ed94 Add tests on inspect
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-15 17:20:37 +02:00
Ulysses Souza 96bc1ca6f1 Add inspect command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-15 15:08:04 +02:00
Guillaume Tardif e7682682fb Store context type in metadata to make retrocompatibility with previous contexts easier (potentially switching back and forth) 2020-06-10 18:17:48 +02:00
Djordje Lukic 8400795caf Add the store to the gRPC context
The contexts service needs it
2020-06-09 12:11:59 +02:00
Djordje Lukic c8079d61ee Move streams into own package 2020-06-08 16:01:53 +02:00
Djordje Lukic bb69de1db3 Add context endpoint to set the current context 2020-06-08 16:01:43 +02:00
Djordje Lukic 71087c68be Add exec.ts for an example of exec over gRPC 2020-06-08 09:46:27 +02:00
Djordje Lukic c34d016fdb Unify protos with client interfaces
* change function names in containers.proto
* add streams proto
2020-06-08 09:43:19 +02:00
Djordje Lukic 31a0716c87 Use stdcopy if the container doesn't have a tty 2020-06-08 08:46:30 +02:00
Guillaume Tardif 1c94893d2f Fix slight bug in error handling 2020-06-03 12:20:49 +02:00
Djordje Lukic cb14c05e74 Move the context server into own package
It had notthing to do in the cli package
2020-05-26 10:31:14 +02:00
Djordje Lukic 129e675932 Put all protos inside the `protos` package 2020-05-25 15:04:28 +02:00
Djordje Lukic 36c01f511b Refactor the interceptors
Avoid having a function that takes in two contexts as parameters
2020-05-22 10:16:04 +02:00
Djordje Lukic 5945e6a56c Implement gRPC logging 2020-05-22 10:16:04 +02:00
Christopher Crone ebe3fbc180 Use config dir for serving API
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-20 15:56:07 +02:00
Djordje Lukic a26dd81307 Add timeout as a parameter to the stop action 2020-05-18 15:31:59 +02:00
Djordje Lukic ce7cbd4463 Add `Stop` command on the gRPC side. 2020-05-18 15:31:59 +02:00
guillaume.tardif ecfffc6feb Allow server to start on tcp port or if windows, named pipe rather than unix socket. could not yet make it work on named pipe from js client (connects but error) 2020-05-18 14:14:52 +02:00