Nicolas De Loof
0bdad7e551
pass compose.Service to cobra commands, dependency-injection style
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-22 17:50:56 +02:00
Guillaume Tardif
073d8e5545
Categorize failure metrics, set specific metrics for compose file parse error, file not found, cmdline syntax errors, build error, pull error.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-09 17:20:29 +02:00
Guillaume Tardif
86f5e311d7
Replace custom error type for exit code with existing one from docker/cli.
...
Will also help to move towards CLI plugin.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-07 15:48:37 +02:00
Nicolas De Loof
48402585fd
replace passing parameters by context with singletons
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-12 15:28:17 +01:00
aiordache
f1f4ca4833
Check -H flags and DOCKER_HOST/DOCKER_CONTEXT vars when determining current context
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-08 19:28:16 +01:00
aiordache
fef479ad1f
update test
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-05 16:30:52 +01:00
aiordache
6458b97089
test fix
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-05 14:48:18 +01:00
aiordache
f0fd18eec9
set current context to default when -H flag is set
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-05 14:34:49 +01:00
aiordache
6f1d88e3bc
Fix test and load dockerconfig in the backend
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-05 14:34:49 +01:00
aiordache
d26783c322
Add connection flags to root command
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-05 14:34:49 +01:00
Nicolas De Loof
58e495c60b
only display experimental warning on command error
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-02-23 09:57:09 +01:00
aiordache
afac025a49
Add `compose exec` command
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-02-16 10:56:00 +01:00
Nicolas De Loof
d9fe745cc0
avoid use of channels in API for gRPC compatibility
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-02-11 09:34:08 +01:00
Nicolas De Loof
9f80214dc2
Make -l -D -H non-persistent to avoid conflict with subcommands
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-02-04 17:13:44 +01:00
Nicolas De Loof
4cbb33e20d
Add support for --log-level
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-02-03 11:49:21 +01:00
Guillaume Tardif
aca816d5d6
Remove example backend.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-19 11:29:48 +01:00
Guillaume Tardif
2a8c24e4ff
Move config => api/config
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 16:55:10 +01:00
Guillaume Tardif
f1ac6d4fdc
Move errdefs => api/errdefs
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 16:54:18 +01:00
Guillaume Tardif
0ea97920c1
Move Context & context/store => api/context & api/context/store
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 16:31:59 +01:00
Guillaume Tardif
65f53dff43
move metrics => cli
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 15:26:35 +01:00
Guillaume Tardif
1939047fe6
Add backend-metadata command (hidden) for CLI backend
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-05 16:36:51 +01:00
Nicolas De Loof
7a2e041524
Parse --version and forward to docker/cli
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-14 15:16:22 +01:00
Guillaume Tardif
b604ba6246
Fix 2 corner cases with PATH settings
...
* windows PATH should use windows separator (;)
* do not add separator if initial PATH is empty (was creating PATH=:/path)
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-29 15:35:22 +01:00
Guillaume Tardif
5e809acd87
Use OS-dependant pathListSeparator, when appending to PATH
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-29 15:09:38 +01:00
Nicolas De Loof
de96a0c1d0
CLI command to manage ECS volumes
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-10-20 16:52:50 +02:00
Guillaume Tardif
a5e34323e2
Add `docker prune` command and ACI implementation
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-14 17:48:11 +02:00
Ulysses Souza
10632b008b
Add version to UserAgent on ACI
...
This also refactors the Version insertion to make it global
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-12 09:15:32 +02:00
Guillaume Tardif
0d3f7186c5
Hardcoded list of commands and simplified metrics gathering.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 11:59:12 +02:00
Amos Law
e10424e316
Normalize case of command and flag help
...
Signed-off-by: Amos Law <ahlaw.dev@gmail.com>
2020-10-03 20:43:18 -04:00
Guillaume Tardif
b8968e83cd
Do not fail when constructing error message for commands not implemented. Use metrics GetCommand() the is already used 3 lines above for metrics tracking.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-30 10:49:14 +02:00
Chris Crone
7b169744a2
cli: Sort main imports
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-09-25 14:28:26 +02:00
Guillaume Tardif
8302266212
In metrics, send context type, not context name (metrics for Moby calls)
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-23 16:12:09 +02:00
Guillaume Tardif
334ebf5f75
Implement --domainname flag on compose up, also defining compose extension "x-aci-domain-name" to store ACI DNSLabelName.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-22 14:41:31 +02:00
Guillaume Tardif
268c02523a
Only add `--domainname` flag to `docker run` in ACI context
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-22 14:41:31 +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
3ccc603461
Add status field in CLI metrics : success, failure, cancelled
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-18 10:47:50 +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
Guillaume Tardif
b85eddd09c
Remove duplicated code formatting multi errors
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-11 16:08:14 +02:00
Guillaume Tardif
099b64935b
Minor fixes
...
Co-authored-by: Chris Crone <christopher.crone@docker.com>
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-10 14:55:46 +02:00
Guillaume Tardif
38a8f5310b
Volume command is only available in aci context type, with ACI specific flags
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-10 09:14:39 +02:00
Guillaume Tardif
08562b403e
Connecting it all
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-08 15:30:50 +02:00
Guillaume Tardif
9ed06ece5b
Adding volume API & initial CLI command
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-08 15:30:50 +02:00
Guillaume Tardif
303958bb44
Merge pull request #574 from ulyssessouza/alias-rm-kill
...
Add 'kill' as an alias to 'stop'
2020-09-04 13:07:38 +02:00
Guillaume Tardif
adeba9b124
Fix bug not allowing users to run any context command when set to an aws context type.
...
When users have an “aws" context type, we try to exec the command (will execute context ls, context use, etc.) and when it fails because it doesn’t find the aws backend, then display the custom error for aws context type.
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-04 11:01:55 +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
Nicolas De Loof
fed50d79f2
introduce ecs-local context
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-08-31 15:30:05 +02:00
Nicolas De Loof
7f8bb030e6
Introduce ECS emulation mode
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-08-31 10:01:52 +02:00
Guillaume Tardif
ad5c465bd1
Merge pull request #485 from docker/repo-rename
...
Rename docker/api -> docker/compose-cli
2020-08-25 15:58:51 +02:00
Ulysses Souza
59f7d7cd00
Redirect user from plugin usage to integrated ECS
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-08-24 19:29:10 +02:00