Ulysses Souza
4ff20bdda8
Add start and stop commands
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-27 17:18:10 -03:00
Guillaume Tardif
3f474143ad
Merge pull request #1163 from docker/stop-on-ctrlc
...
Stop project on Ctrl+C
2021-01-26 17:08:32 +01:00
Nicolas De Loof
f33eff5903
introduce `--filter` option on `compose ls`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-01-22 10:27:56 +01:00
Ulysses Souza
0529415fa7
Stop project on Ctrl+C
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-20 10:02:59 -03:00
Guillaume Tardif
6859413a5d
Moving last things from /tests, removing dead code
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-19 15:48:48 +01:00
Guillaume Tardif
46935b0300
Move tests to each backend folder
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-19 15:25:26 +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
5e20ffdc50
Move prompt => utils/prompt
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 16:49:12 +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
930ae8bdb2
goimports -local github.com/docker/compose-cli -w . ; gofmt -s -w .
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 16:24:00 +01:00
Guillaume Tardif
801e747adb
Move context/cloud => api/cloud
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 16:23:53 +01:00
Guillaume Tardif
4dee783aba
Move progress => api
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 15:57:24 +01:00
Guillaume Tardif
6a8b344885
Move backend => api
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-15 15:44:42 +01:00
Guillaume Tardif
010c4be6b2
Support container_name in ACI and add network alias in dns sidecar.
...
(Note container_name is used in several MSFT examples)
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-12 15:44:37 +01:00
Nicolas De Loof
4de01936f8
introduce --remove-orphans option
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-01-06 14:36:59 +01:00
Guillaume Tardif
32d5644937
Pass reader Writer as options to backend, remove hardcoded os.Stdout
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:01:06 +01:00
Guillaume Tardif
76f36a69c6
Reusing existing Create() and Start() API
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:00:18 +01:00
aiordache
412385c495
Add `compose run` command
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-12-18 09:58:55 +01:00
Nicolas De Loof
eda6a59379
introduce options struct in the API
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-17 11:10:57 +01:00
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
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
5f730436d4
ACI: Allow setting protocol when publishing ports
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-11 16:45:48 +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
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
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
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
Guillame Tardif
4d1f265c62
Adding error progress indication when errors
...
Signed-off-by: Guillame Tardif <guillaume.tardif@gmail.com>
2020-11-27 18:18:14 +01:00
Guillame Tardif
7ddd8e5e97
Helper methods to create progress events, more homogeneous display for “creating”, “Created”, …
...
Signed-off-by: Guillame Tardif <guillaume.tardif@gmail.com>
2020-11-27 17:55:36 +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
Chris Crone
03e95839c8
deps: Update Go modules, remove duplicate
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-23 15:03:03 +01:00
Ulysses Souza
3fbb9bd864
Add auto creation of Azure volumes during `compose up`
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-11-20 16:34:11 +01:00
Guillaume Tardif
3d18eda869
Do not specify successThreshold, from MSFT : defaults to 1 and cannot be changed, related to Kube healthchecks: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#probe-v1-core
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-13 14:14:42 +01:00
Nicolas De loof
aa09ecb1f8
Merge pull request #905 from docker/fix_aci_potential_nil_panic
...
Use ACI .IsHttpStatus() rather than accessing .StatusCode directly
2020-11-12 15:12:14 +01:00
Guillaume Tardif
0d74298eed
Use ACI .IsHttpStatus() rather than accessing .StatusCode directly, that might lead to nil pointer panic
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-12 15:01:18 +01:00
Guillaume Tardif
624308134f
Specific error message when specifying path as a volume source. Removed volume reference validation already done at https://github.com/compose-spec/compose-go/blob/5afecaa4cb/loader/validate.go#L38
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-12 11:38:40 +01:00
Guillaume Tardif
40334d570a
Avoid nil pointer when reading logs of a just terminated container.
...
Hit this when following logs of a container restarted with a health check:
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x168771e]
goroutine 1 [running]:
github.com/docker/compose-cli/aci.getACIContainerLogs(0x2d85260, 0xc000526c60, 0xc0001465a0, 0x24, 0xc0004f4da0, 0xa, 0xc0004f4db0, 0x7, 0x7ffeefbffab2, 0xb, ...)
github.com/docker/compose-cli/aci/aci.go:285 +0x1fe
github.com/docker/compose-cli/aci.streamLogs(0x2d85260, 0xc000526c60, 0xc0001465a0, 0x24, 0xc0004f4da0, 0xa, 0xc0004f4db0, 0x7, 0x7ffeefbffab2, 0xb, ...)
github.com/docker/compose-cli/aci/aci.go:297 +0x2e5
```
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-09 18:19:31 +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
Guillaume Tardif
37737c3887
Do not send zero values in LivenessProbe, blocking deployments in some cases
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-06 12:21: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
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
Guillaume Tardif
5bdcfe2e4a
Pin version of ACI sidecar image, so that we don’t affect prod users when re-publishing :latest.
...
Makefile includes a target to publish new versions, ensuring we don’t override an existing image tag
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-28 17:19:12 +01:00
Guillaume Tardif
3e797f5088
Add trailing empty line in /etc/hosts that seem to be causing flakiness in name resolution for the last service mentioned
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-27 09:41:19 +01:00
Guillaume Tardif
b138a3e4f6
Log something to be able to see what is happening remotely
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-26 15:21:16 +01:00
Guillaume Tardif
18e43b277c
fmt.Scanln() does not wait forever… waiting for process termination signal
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-26 15:06:30 +01:00
Guillaume Tardif
3dddbcd7df
We need to pass the full command and not rely on ENTRYPOINT for ACI containers, ACI overrides the ENTRYPOINT with commands.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-26 15:03:37 +01:00
Nicolas De Loof
553865f294
minimalist container image to setup /etc/hosts on ACI
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-10-21 10:25:05 +02:00
Nicolas De loof
455c08c245
Merge pull request #804 from docker/separate_secret_code
...
Move ACI conversion code to specific files
2020-10-21 10:18:47 +02: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
Guillaume Tardif
38a58855b5
Move more specific code out of convert.go: restart policy
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 17:54:13 +02:00
Guillaume Tardif
406eb681d2
Moving code from global convert.go to volumes.go, ports.go
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 17:47:31 +02:00
Guillaume Tardif
7d04038690
Separate secret convert code into its own file
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 17:27:59 +02:00
Guillaume Tardif
487a4e485c
Fix Flaky test due to array random order
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 17:13:52 +02:00
guillaume.tardif
18966eb3a1
for secret target path, use path.Join etc. instead of filepath.Join, as these paths are container side, not cli side. (do not use windows paths).
...
Signed-off-by: guillaume.tardif <guillaume.tardif@gmail.com>
2020-10-16 14:57:47 +02:00
Ulysses Souza
06e44a813c
Support absolute paths for secrets
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-15 15:46:07 +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
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
d8cd4038c2
Fix panic when invoking inspect with empty container id (ACI SDK returns status 200 but nil container group properties)
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-13 15:33:52 +02:00
Guillaume Tardif
be4b9a6812
Merge pull request #760 from docker/add-quiet-flags
...
Add --quiet for some commands
2020-10-13 09:00:58 +02:00
Ulysses Souza
45212c6e21
Squash all secrets in a single one
...
Also adds an e2e test
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-12 14:17:37 +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
Ulysses Souza
4d6a0bb00d
Remove inline secrets option
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-09 14:54:12 +02:00
Ulysses Souza
99186b1d04
Look for all mounts before removing a volume
...
This checks the volume mounts of all container groups from all
resource groups before removing a volume/fileshare
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-09 14:39:21 +02:00
Guillaume Tardif
68d0413e36
Minor cleanup
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-09 11:53:53 +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
343d54dac5
Allow to set memory / CPU limits higher than requests, ACI will request that limits are not higher than the total request for the container group. Also set requests = limits when only limits are set
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 17:03:30 +02:00
Guillaume Tardif
c09f771359
Use compose resource request to set ACI retrouve request, and single container resource requests.
...
Limits should be used to allow one container in a container group to use more than the container requested resources, up to the total resources requested for the container group.
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 17:03:30 +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
97576db803
Merge pull request #689 from ulyssessouza/json-out
...
Add json output format to several commands
2020-10-05 10:30:30 +02:00
Ulysses Souza
863d8ba7a8
Merge pull request #700 from gtardif/aci_constants
...
Regroup azure constants that might be things to switch in order to provide access to other azure clouds
2020-10-02 17:19:52 +02:00
Ulysses Souza
ef5e013aa7
Return empty list instead of nil on List
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +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
b514dafa91
Regroup azure constants that might be things to switch in order to provide access to other azure clouds.
...
See `az cloud list` to list endpoints specific to each azure cloud.
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-30 14:05:28 +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
7eda96bea4
Fix nil pointer when creating volume with “” storage account
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-24 12:59:29 +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
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
701d1b834e
ACI: allow users to set DNSLabelName and deploy containers with fqdn like `myapp.eastus.azurecontainers.io`
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-22 14:41:31 +02:00
Guillaume Tardif
7abdb085c0
Merge pull request #637 from docker/volume_tests
...
Added tests on ACI volume conversion, mock storageLogin required to get storage account keys
2020-09-22 14:40:46 +02:00
Guillaume Tardif
0092de6df1
Added tests on ACI volume conversion, mock storageLogin required to get storage account keys
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-22 14:24:12 +02:00
Guillaume Tardif
f42e05fcc3
Merge pull request #636 from docker/update-copyright
...
Update copyright
2020-09-22 12:21:16 +02:00
Guillaume Tardif
772493d70d
Merge pull request #617 from ulyssessouza/volumes_ro
...
Add 'readOnly' capability to volumes on ACI
2020-09-22 12:14: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
Ulysses Souza
02d59ae510
Add 'readOnly' capability to volumes on ACI
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-09-18 12:07:42 +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
10372b7098
Merge pull request #625 from docker/aci_context_create_no_sub
...
Check specified subscription in context create and if not found, prompt users they might need to login with -—tenant-id.
2020-09-17 22:29:06 +02:00
Guillaume Tardif
292ec55f46
Check specified subscription in context create and if not found, prompt users they might need to login with -—tenant-id.
...
Cf https://github.com/docker/aci-integration-beta/issues/27
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-17 22:05:43 +02:00
Guillaume Tardif
e904c71b04
Merge pull request #624 from docker/feat-api-metrics
...
Add interceptor for API metrics
2020-09-17 11:40:22 +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
0c1de64c84
Merge pull request #610 from docker/fix_volume_error_message
...
fix error message on ACI docker volume rm
2020-09-15 12:38:32 +02:00
Guillaume Tardif
06d0ffae82
Fix volume error message
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-15 09:27:22 +02:00