Commit Graph

464 Commits

Author SHA1 Message Date
Nicolas De Loof 855a879a6a
Introduce `removeOrphans` to cleanup injected AWS simulation container
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-17 10:46:17 +01:00
Nicolas De Loof db5467ce22
Use local compose implementation for local ecs simulation context
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-17 10:46:16 +01:00
Nicolas De Loof 056dfb95bc
allow to collect logs for a subset of project services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-17 10:32:46 +01:00
Guillaume Tardif f55823b70f Make Moby command detection (based on help output) more robust. It seems some tabs have been replaced by spaces in CLI 20.10. Covered with e2e test TestUnsupportedCommand.
We need to install docker CLI ourselves in Github actions nodes.

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-15 12:32:13 +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 cf378834e5 No rebuild on compose up if image already exists by default, added first use of compose pull_policy and `compose up --build` to allow to force rebuild.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-10 18:38:16 +01:00
Guillaume Tardif cf0e10a431 Adding short description to improve help on compose subcommands
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-10 15:43:20 +01:00
Nicolas De Loof 446008a4b6
on ACI container ID is `project_service` and name is `service`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-09 14:39:10 +01:00
Nicolas De Loof 1d859dc807
`Ps` return ContainerSummary, not Services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-09 10:33:51 +01:00
Guillaume Tardif 04cdd8dd40 Display compose experimental disclaimer only for local context type or moby (default) context type. Fixes ACI / ECS e2e tests.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 16:37:14 +01:00
Guillaume Tardif 5c13bafac5 Add a disclaimer message for all `docker compose` commands
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 15:46:32 +01:00
Nicolas De loof 576aa46d21
Merge pull request #1015 from docker/logConsumer
Revisit logs/up API to pass a LogConsumer vs io.Writer
2020-12-07 14:57:43 +01:00
Nicolas De Loof ca123e08eb
Revisit logs/up API to pass a LogConsumer vs io.Writer
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-07 14:47:44 +01:00
Guillaume Tardif ec5afcfd4d `compose up` and other compose commands running on “Moby” context type.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 14:41:27 +01:00
Nicolas De Loof 136d09e1ac
split `Up` into `Create`+`Start` so logs don't collide with progress
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-04 08:16:50 +01:00
Nicolas De Loof 39e4107e12
attach to log stream by default on `up`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-03 16:51:00 +01:00
Djordje Lukic 2f09b634cc Implement `docker compose pull`
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-12-03 16:14:38 +01:00
Ulysses Souza 7e4cfc0e3b Add order to down command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-12-02 13:51:11 +01:00
Guillaume Tardif 4270f383a7
Merge pull request #988 from docker/feat-platform
Add platform when running containers
2020-12-02 13:24:07 +01:00
Guillaume Tardif 5258e3d56e Add compose build flags for file and working dir
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-02 10:35:28 +01:00
Nicolas De Loof 52574046f0
introduce `compose push` command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-01 14:55:52 +01:00
Nicolas De Loof 5952183eca
introduce `compose build` command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-30 12:43:38 +01:00
Djordje Lukic 1148ed8837 Add platform when running containers
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-30 11:51:46 +01:00
Nicolas De Loof b1a4dfd659
filter compose project to remove all services not required by command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-30 10:46:11 +01:00
Ulysses Souza fe566d24e6 Bump `azure-sdk-for-go`: v43.3.0 -> v48.2.0
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-11-24 11:48:26 -03:00
Nicolas De loof 38d2dd9b41
Merge pull request #907 from docker/aci_healthcheck_threshold 2020-11-17 13:35:01 +01:00
Guillaume Tardif bc966daf34
Merge pull request #912 from docker/compose-api
Compose api
2020-11-17 09:51:13 +01:00
Guillaume Tardif 5abc68ebdd Add compose service, run `compose up` through API
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-16 12:11:52 +01:00
Guillaume Tardif 575307d8af Fix run default value for health check retries
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-13 14:14:41 +01:00
Guillaume Tardif 0ef42f7bcb Fix converting run health check options
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-13 11:49:44 +01:00
Guillaume Tardif 91e5d178d2 Fix ports & Host config not being initialised in inspect view, fix E2E tests
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-12 18:00:22 +01:00
Ulysses Souza 49759af15c Add container inspect view
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-11-12 17:16:54 +01:00
Guillaume Tardif cfa090459b Move list of run specific flags where it’s used
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-06 15:38:50 +01:00
Guillaume Tardif 5c04e84e49
Merge pull request #882 from docker/yaml
Marshall cloudformation template as yaml
2020-11-06 13:51:12 +01:00
Ulysses Souza f6509ac814 Add Healthchecks to ACI
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-11-06 12:21:12 +01:00
Ulysses Souza 7aee922b35 Remap restart policies for command run
This adds 'no' and 'always' as options.

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-11-06 10:37:53 +01:00
Guillaume Tardif 66a1263342 No specific case for windows, always resolve binary name before executing command
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-05 17:38:03 +01:00
Guillaume Tardif 41a1553dab No specific case for windows, always resolve binary name before executing command
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-05 17:31:26 +01:00
Guillaume Tardif 3936826673 Keep original license in windows lp_windows.go
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-05 17:12:03 +01:00
guillaume.tardif 4489f39e5d duplicate windows os/exec.LookPath() and do not resolve files in current working dir if CWD is not explicitly in PATH.
Signed-off-by: guillaume.tardif <guillaume.tardif@gmail.com>
2020-11-05 16:43:17 +01:00
Nicolas De loof c6fc0e116f
Merge pull request #879 from docker/acceskey_file
Flag to import access key & secret from file
2020-11-05 14:08:51 +01:00
Nicolas De Loof cb02622318
Marshall cloudformation template as yaml
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-05 11:01:32 +01:00
Nicolas De Loof 44c58e7806
Flag to import access key & secret from file
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-04 17:20:10 +01:00
Guillaume Tardif db7d04db79 Remove obsolete flag `--json` (that was marked hidden), kept for VSCode extension but is not used, `docker context ls --format “{{ json . }}”` is used.
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-04 14:54:01 +01:00
Nicolas De loof f66123b34a
Merge pull request #846 from docker/ecs_context 2020-11-03 11:38:06 +01:00
aiordache 3066a1cdad cleanup
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-30 18:50:56 +01:00
Chris Crone 25e6a18fef backend: Add --rm support to local backend
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-10-30 18:19:02 +01:00
aiordache de0be8650e Remove region from contexts and cleanup
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-30 17:51:16 +01:00
Guillaume Tardif c3cc54316b This new field Named “Type” breaks VSCode extension for some strange reason, lets rename it ContextType
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-30 13:32:13 +01:00
Guillaume Tardif 7cc3bc3870 No breaking change on `docker context ls —format “{{ json . }}` , this is used by VSCode extension
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-30 10:37:36 +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
aiordache 53efa312c8 Refactor context create options
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-29 10:25:23 +01:00
aiordache 2dcd1a5826 refactor ecs context creation
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-29 10:10:00 +01:00
Guillaume Tardif 02501407de Add update command for backward compatibility
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-28 14:26:32 +01:00
Ulysses Souza 69083e07e6 Add --rm to run command (as not yet implemented)
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-27 01:57:35 +01:00
Ulysses Souza 29ba42bbc4 Fix volume create cli bug
This passes the pointer to the concrete struct instead of a copy

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-20 19:34:06 +02: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
aiordache 8f31ad59be Refactor secrets
- create secrets from files
  - update Secret structure

Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-19 11:33:55 +02:00
Guillaume Tardif 85c94a2f7f Replace `docker run —envFile` with `docker run —env-file`
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 18:03:47 +02:00
Anca Iordache 05295b5e8a
Merge pull request #765 from docker/ecs_default_profile
Populate ~/.aws/config(credentials) on ecs context create
2020-10-16 11:33:03 +02:00
aiordache c2af0a136a Populate ~/.aws/config(credentials) on ecs context create
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-15 20:26:38 +02:00
Guillaume Tardif 50a2ae1100 Display summary of reclaimed ACI resources (CPU/mem) in `docker prune`
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-15 15:45:48 +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 660c7bbdcf Add command "volume inspect"
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-14 11:11:55 +02:00
Ulysses Souza 6c1ea32dae Add --quiet for some commands
- compose ls
- compose ps
- secret ls // Not implemented on ACI so no e2e-aci tests
- volume ls

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-12 11:34:27 +02:00
Nicolas De loof a067882b6d
Merge pull request #734 from docker/add-version-in-user-agent
Add version to UserAgent on  ACI
2020-10-12 11:11:55 +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 6516632ecf Add resource reservations to container inspect
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 17:47:16 +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
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
aiordache 265dd197c3 Add detach flag to `compose up`
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-07 15:51:43 +02:00
Guillaume Tardif a1bb2d5abe Allow `docker context ls —formatter {{json.}}` to not delegate to Moby and include context type in the json
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-06 18:00:35 +02:00
aiordache c15d05f7f4 refactor task failure detection
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-05 19:37:13 +02:00
aiordache d3effd2ead Detect task failures
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-05 16:55:35 +02:00
Guillaume Tardif 144c403e96
Merge pull request #721 from ahlaw/main
Normalize case of command and flag help
2020-10-05 11:45:47 +02:00
Guillaume Tardif 97576db803
Merge pull request #689 from ulyssessouza/json-out
Add json output format to several commands
2020-10-05 10:30:30 +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
Ulysses Souza 344db70274 Fix version command on bypassing to moby cli
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-02 19:04:43 +02:00
Ulysses Souza 74e86ab06a Fix HTML escape encoding
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-02 18:53:22 +02:00
Guillaume Tardif 6d0f7f399f Fix regression: let users login to local registry (no '.' In registry name)
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-02 13:54:59 +02:00
Ulysses Souza 83f21b9293 Remove unused files
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza b8a1e6c888 Change JSON output to individual lines
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza 3e9095a873 Fix docker context ls for retrocompatibility
It writes each context as an independent object line

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza 6c883dc4a5 Print only the information present in pretty on json
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza 604cf0c911 Add comment on legacy --json option
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza 044e7f571d Remove go template from help on list commands
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza fb59c9385d Fix tests
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza 0f6f547214 Refactor Print method for lists
This also fixes in the case of nil list

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza 8961805412 Add json output format to several commands
- docker context ls
- docker ps
- docker compose ls
- docker compose ps
- docker secret ls
- docker volume ls
- docker version

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Guillaume Tardif abd6af6386
Merge pull request #704 from ulyssessouza/add-envFile
Add envFile arguments to run command
2020-10-01 13:55:24 +02:00
Guillaume Tardif 0ac5ce6a76
Merge pull request #702 from gtardif/run-args
Add argument support to run command
2020-10-01 11:22:03 +02:00
Ulysses Souza 2e899202ec Add envFile arguments to run command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 06:19:08 +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 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
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
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 ca35ccfb0e ACI Volumes : create takes one required arg, instead of required flag `--fileshare` (we still have required flag `--storage-account` specifically for ACI)
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-24 17:10:32 +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 cf3bb18c0e User compose.service.domainname rather than custom ACI extension for ACI DNSLabelName
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-22 14:44:22 +02:00