Commit Graph

307 Commits

Author SHA1 Message Date
Guillaume Tardif 9789ce119b
Merge pull request #268 from docker/compose_expose_miltiple_ports
Allow ACI compose to expose several ports
2020-06-23 16:17:39 +02:00
Guillaume Tardif 7306821804 Allow ACI compose to expose several ports 2020-06-23 16:00:52 +02:00
Guillaume Tardif fa8b911cd8 Allow running `docker -v` or `--version` even if context is not default 2020-06-23 15:13:43 +02:00
Guillaume Tardif 4197ef8b68
Merge pull request #263 from docker/fix_host_flag
Shell out to Moby cli if user uses -H, regardless of context set.
2020-06-23 14:57:54 +02:00
Guillaume Tardif ab39310771 Allow --format on docker context ls. Fixing VS Code extension shellout 2020-06-23 13:25:43 +02:00
guillaume.tardif 4afdc69bb7 e2e test running on windows, default endpoint is npipe on windows 2020-06-23 12:49:02 +02:00
Guillaume Tardif 38d4f8d25a Shell out to Moby cli if user uses -H, regardless of context set. Moby cli will refuse both options (context & host) to be set at the same time 2020-06-23 12:00:46 +02:00
Guillaume Tardif 03f11e2953
Merge pull request #247 from docker/main_command_cleanup
Main command cleanup
2020-06-23 10:35:07 +02:00
Guillaume Tardif c3924f2e8e Add -H flag to our own version command & login command, & also —-log-level (-l) flag. 2020-06-22 18:22:18 +02:00
Guillaume Tardif 2824a7a736 Context aci create : check context name does not exists before starting interactive aci create 2020-06-22 18:20:40 +02:00
Guillaume Tardif daf7061e30
Merge pull request #244 from docker/aci_dns_sidecar
Aci dns sidecar
2020-06-19 11:49:04 +02:00
Guillaume Tardif 76a1753396 ACI e2e required change, because the output includes the progress info. 2020-06-18 17:45:01 +02:00
Djordje Lukic ad72c866cc Add license headers 2020-06-18 16:48:03 +02:00
Guillaume Tardif 6dfd22cb1f
Merge pull request #236 from docker/aci_allow_update_compose
Allow compose updates without having to delete the stack every time.
2020-06-18 10:31:34 +02:00
Guillaume Tardif f403307edf Allow compose updates without having to delete the stack every time.
Update will “typically” keep the same IP, but this isn’t guaranteed by azure
(ACI has limitations on what can be updated, but this does not apply to us for the moment : https://docs.microsoft.com/en-us/azure/container-instances/container-instances-update#properties-that-require-container-delete)
For the moment I check in the test that the IP is keep the same
2020-06-18 10:03:28 +02:00
Guillaume Tardif 3981244701 Fix bug where we shell out to Moby cli only if context == default. We must shell out to Moby cli for any context of type “Moby”, not only the default context. 2020-06-18 09:25:28 +02:00
Guillaume Tardif fe57e4c159 Fix a bug where calling login, context inspect did not do anything if not on default context. These command will shell out to Moby cli regardless of current context 2020-06-18 09:25:28 +02:00
Guillaume Tardif 1bb2909d1a Do not restrict `docker inspect` to 1 arg, can be zero (inspect current context), one or several.
Especially, inspect with zero param is already used by VSCode. Cf https://github.com/docker/desktop-microsoft/issues/19
2020-06-18 09:21:48 +02:00
Guillaume Tardif bbcdad39d5 Renamed docker-classic to “com.docker.com”. 2020-06-17 17:57:53 +02:00
Djordje Lukic 4232b66a6b
Merge pull request #228 from docker/compose_project_name
Changed compose flag —name to —project-name, -p, aligned with docker-compose flag.
2020-06-17 05:52:55 -07:00
Ulysses Souza f6aad0d7b4 Add --json option to commands
- docker ps
- docker context ls

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-17 10:00:42 +02:00
Guillaume Tardif 830914cb15 Prepare for release 0.1.0 2020-06-17 08:41:54 +02:00
Guillaume Tardif 2a49c3b32f added -q flag to `docker context ls`. (This is now used in desktop e2e wsl2 tests)
See https://ci-next.docker.com/teams-desktop/blue/organizations/jenkins/desktop%2Fdesktop-test-single-branch-win/detail/desktop-test-single-branch-win/274982/pipeline/
2020-06-17 07:40:27 +02:00
Guillaume Tardif 404f2629a3 Changed compose flag —name to —project-name, -p, aligned with docker-compose flag. 2020-06-17 07:17:58 +02:00
Guillaume Tardif ef2f90b334 Fix e2e 2020-06-16 15:55:03 +02:00
Ulysses Souza 5b1522095b Fix linter
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-16 10:59:40 +02:00
Guillaume Tardif 9257d0ff49
Merge pull request #205 from ulyssessouza/inspect
Add inspect command
2020-06-16 09:33:33 +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
Guillaume Tardif eb505ecd75 Add -f option to force remove current context and switch to default if required 2020-06-15 16:28:43 +02:00
Guillaume Tardif ddc44d7abe Do not allow deleting curent context without -f flag 2020-06-15 15:52:44 +02:00
Guillaume Tardif 84cdf58e8a default context type is “moby” 2020-06-15 12:25:35 +02:00
Guillaume Tardif 113350a09d Context create aci is now a subcommand, as Moby and example. Root `docker context create` also allows backward compatibility to create docker contexts as before 2020-06-15 12:19:06 +02:00
Guillaume Tardif 667cdfcbf8
Merge pull request #212 from rumpl/chore-remove-node
Remove node test, node-sdk has these tests
2020-06-15 12:05:37 +02:00
Guillaume Tardif 336df897c1
Merge pull request #207 from docker/version_cli
version command adding azure integration beta version in textual output
2020-06-15 12:02:33 +02:00
Guillaume Tardif afa205be95 Server version : will be 1.0.0-beta1, -beta2, … 2020-06-15 11:51:03 +02:00
Djordje Lukic f0efaf7a79 Remove node test, node-sdk has these tests
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-06-15 11:41:50 +02:00
Guillaume Tardif 376a4b671c version command adding azure integration beta version in textual output 2020-06-13 10:47:05 +02:00
Guillaume Tardif 3c2eb067bc Fix typo in DOCKER ENPOINT 2020-06-12 14:50:35 +02:00
Guillaume Tardif 9d4eed2356 Fix flaky test (subject to running tests in //) 2020-06-11 15:06:39 +02:00
Guillaume Tardif 93984f8c68 Removed test requiring linux containers 2020-06-11 12:58:58 +02:00
Guillaume Tardif 5258906ce3 Fix windows PATH for e2e tests 2020-06-11 10:44:30 +02:00
Guillaume Tardif f3f6bff583 Fix linter 2020-06-11 10:44:30 +02:00
guillaume.tardif c92df92d29 Fix API Server E2E test using npipe on windows, not sockets 2020-06-11 10:44:30 +02:00
guillaume.tardif bed0b81343 Fix windows E2E suite setup to work properly on windows 2020-06-11 10:44:30 +02:00
guillaume.tardif c73998bd2d Fix e2e tests using golden files on windows 2020-06-11 10:44:30 +02:00
Guillaume Tardif 72bae873c5 Do not delegate to old cli if cobra fails before invoking the PreRun or SetHelp hook that call isOwnCommand(). Find the command from root.Find(args).
Tried to use  `cmd, err := root.ExecuteC()` but I can’t pass the context like with `root.ExecuteContext(ctx)`, could not find a way without and explicit call to root.Find(args)
2020-06-10 17:25:52 +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 67fb49c98c
Merge pull request #179 from rumpl/feat-stream
Feat stream
2020-06-08 06:52:56 -07:00
Guillaume Tardif f1a5f2d6cf Backend is responsible for generating containers IDs and truncate them if wanted/supported for docker ps 2020-06-08 12:37:33 +02:00
Djordje Lukic 71087c68be Add exec.ts for an example of exec over gRPC 2020-06-08 09:46:27 +02:00
Guillaume Tardif f939dd4d47 Display friendly message if unknown command is available in default context 2020-06-05 18:24:08 +02:00
Guillaume Tardif 54141a9bdd Do not display exit status when classic cli exit in error 2020-06-05 18:17:18 +02:00
guillaume.tardif 7c6b04f28e make e2e TestKillChildOnCancel exec properly on windows 2020-06-04 17:58:24 +02:00
Guillaume Tardif 427527d197
Merge pull request #146 from docker/chore-refactor-azure-login
Refactor Azure login local server
2020-06-04 10:39:30 +02:00
Christopher Crone 35789ace12 Azure: Refactor creation of login server
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-03 17:10:54 +02:00
Guillaume Tardif 774bfea341 Refactoring, add unit test or various interactive context creation 2020-06-03 10:55:55 +02:00
Guillaume Tardif 5675763856 Interactive context create, adding method CreateContextData to CloudService interface, so Cloud Backends can provide a custom context creation method. 2020-06-02 16:04:08 +02:00
Guillaume Tardif e2b9f5bc57 Move login to root command, delegate to classic login when only one arg and not dot in it 2020-06-01 22:55:46 +02:00
Guillaume Tardif 528d47ce08 Add docker context inspect command relying on classic docker 2020-05-29 12:02:14 +02:00
Guillaume Tardif ea98a2dd78 Fix docker-classic creation makefile target 2020-05-27 21:14:07 +02:00
Guillaume Tardif cc46f84043 Forward closing signal to docker-classic when closing docker. Note this will not forward Kill signal, impossible to intercept / process this one. 2020-05-27 18:38:51 +02:00
Guillaume Tardif e630ace677
Merge pull request #154 from docker/fix_context_inspect_shellout
Fix shell out to docker-classic when invoking
2020-05-27 17:02:01 +02:00
Guillaume Tardif d2648da2d9 Fix shell out to docker-classic when invoking 2020-05-27 16:12:40 +02:00
Guillaume Tardif 66a83410dd Ensure we have a clear error message in case of wrong setup (previously it would just exit with no error message) 2020-05-26 23:46:02 +02:00
Djordje Lukic 7e2d22f5ea Change the path to the contexts protos for node 2020-05-26 10:32:09 +02:00
Djordje Lukic 129e675932 Put all protos inside the `protos` package 2020-05-25 15:04:28 +02:00
Djordje Lukic 11339761ca Change the way a context is stored
Initially we stored the context data in the `Metadata` of the context
but in hindsight this data would be better of in the `Endpoints` because
that's what it is used for.

Before:
```json
{
  "Name": "aci",
  "Metadata": {
    "Type": "aci",
    "Data": {
      "key": "value"
    }
  },
  "Endpoints": {
      "docker": {}
  }
}
```

After:
```json
{
  "Name": "aci",
  "Type": "aci",
  "Metadata": {},
  "Endpoints": {
      "aci": {
          "key": "value"
      },
      "docker": {}
  }
}
```

With this change the contexts that we create are more in line with the contexts the docker cli creates.

It also makes the code less complicated since we don't need to marsal twice any more. The API is nicer too:

```go
// Get a context:
c, err := store.Get(contextName)

// Get the stored endpoint:
var aciContext store.AciContext
if err := contextStore.GetEndpoint(currentContext, &aciContext); err != nil {
	return nil, err
}
```
2020-05-22 16:32:43 +02:00
Djordje Lukic 5945e6a56c Implement gRPC logging 2020-05-22 10:16:04 +02:00
Djordje Lukic 6a0c0d7032
Merge pull request #125 from rumpl/feat-default-context
Add default context to the context ls output
2020-05-22 01:14:42 -07:00
Djordje Lukic 8495500aa2 Add a CliSuite for cli unit tests
Makes writing unit tests for commands quite easier
2020-05-22 10:13:56 +02:00
Christopher Crone b5156eecc7 Simplify e2e suite helpers
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-21 09:33:08 +02:00
Christopher Crone 7d49706acf Refactor e2e suite code
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-20 18:08:07 +02:00
Christopher Crone a8146ad59c Rework e2e tests into suite
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-20 15:57:10 +02:00
Guillaume Tardif d218c0745e
Merge pull request #121 from gtardif/docker-classic
delegate Moby to docker-classic binary, link docker-classic in e2e tests
2020-05-20 14:28:35 +02:00
Guillaume Tardif 2610b986fd delegate Moby to docker-classic binary, link docker-classic in e2e tests 2020-05-20 14:23:29 +02:00
Ulysses Souza d2fece3311 Fix linter problems
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 10:16:36 +02:00
Ulysses Souza 762f462d80 Get "run" test back to main function
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 10:16:34 +02:00
Ulysses Souza bdd987f246 Refactor placement and method name
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 10:13:12 +02:00
Ulysses Souza d28e5fd742 Add e2e-aci tests for volumes
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 10:13:08 +02:00
Ulysses Souza a33f3e17f8 Fix typo
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 06:45:06 +02:00
Djordje Lukic 04e6023d08
Merge pull request #114 from docker/feat-context-list
Feat context list
2020-05-18 08:06:30 -07:00
Guillaume Tardif 3e2580cfdc
Merge pull request #115 from gtardif/grpc_e2e
First e2e test running grpc e2e test (js test client)
2020-05-18 17:02:48 +02:00
Guillaume Tardif 073832631f First e2e test running grpc e2e test (js test client) 2020-05-18 17:00:16 +02:00
Djordje Lukic 0bd18986dd Add "*" for the current context 2020-05-18 16:42:06 +02:00
Djordje Lukic cf1be96833
Merge pull request #99 from docker/feat-stop
Add `Stop` command on the gRPC side.
2020-05-18 07:40:39 -07:00
peter 43a781581c Add DockerCon 2020 header image and update font 2020-05-18 09:22:08 -05:00
Djordje Lukic a0dda2d094 Add tests for ps --all 2020-05-18 15:31:59 +02:00
Guillaume Tardif 2e8251fb2d
Merge pull request #100 from gtardif/windows_grpc
Allow server to start on tcp port or if windows, named pipe rather than unix socket
2020-05-18 15:18:51 +02:00
Djordje Lukic 7cbbab1739
Merge pull request #109 from chris-crone/context-show
Add context show command
2020-05-18 05:50:20 -07:00
Christopher Crone 10d826eb10 Add context show command
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-18 14:48:02 +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
Djordje Lukic 5effbdc31f Add ACI public ip 2020-05-18 11:36:46 +02:00
Djordje Lukic d8a38afecc Implement printing published ports 2020-05-16 10:41:35 +02:00
Chris Crone cc23137945
Merge pull request #82 from chris-crone/context-use
Add context use command
2020-05-14 19:24:03 +02:00
Christopher Crone 90e11cf349 e2e: Use new context use command
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-14 17:10:24 +02:00
Ulysses Souza a98acafeee Give more time to github actions to run it
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-14 13:01:05 +02:00
Ulysses Souza 323601865d Test output of `docker run`
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-13 17:09:18 +02:00
Ulysses Souza b98f45eb28 Enable "run->rm" cycle on e2e-aci
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-13 10:44:04 +02:00
Ulysses Souza 7ff1899021 Format with goimport and refactor consts
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-13 10:44:04 +02:00
Ulysses Souza 14fb12c8c8 Let `make protos` affect host files
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-13 10:44:04 +02:00
Christopher Crone 5a2a5f5f60 Use new context rm command for e2e
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-12 12:24:47 +02:00
Guillaume Tardif 153e7c1e11 Moved sample compose files in test folder 2020-05-07 09:35:25 +02:00
Guillaume Tardif 13db3437fd ACI Container ids work fine between ps, log & exec, either from single container (docker run) of multi-container compose stack 2020-05-06 22:15:33 +02:00
Guillaume Tardif 9a2ec752b5 Add ACI compose basic e2e test 2020-05-06 15:56:47 +02:00
Guillaume Tardif eb712ac75f Added aci e2e tests, not run in CI since requiring azure login.
Need a `docker rm` command to add nginx e2e test, and compose sample to follow
2020-05-06 15:48:01 +02:00
Djordje Lukic 688e7e5deb Implement quiet flag for ps command 2020-05-06 12:18:53 +02:00
Guillaume Tardif 35c5073cc0 First e2e tests running locally (with example backend) 2020-05-05 14:40:30 +02:00