405 Commits

Author SHA1 Message Date
Guillaume Tardif
dda4b0f3bf Wrap error cause so that we can understand why the cli cannot determine current context.
This happened in Desktop WSL2 tests, we’re blind here : https://ci-next.docker.com/teams-desktop/blue/organizations/jenkins/desktop%2Fdesktop-test-single-pr-win/detail/desktop-test-single-pr-win/120692/pipeline
2020-06-14 19:38:29 +02:00
Djordje Lukic
f19fe9e188
Merge pull request #208 from metcalfc/wsl2
Update classic Docker location depending on OS.
2020-06-13 02:41:48 -07:00
Djordje Lukic
7743ae3bb1
Merge pull request #209 from metcalfc/make_serve
Add a target to run docker serve
2020-06-13 02:41:28 -07:00
Djordje Lukic
4cf5004c4b
Merge pull request #210 from docker/default_context_ls
Strengthen getting default context
2020-06-13 02:40:35 -07:00
Guillaume Tardif
c2a702c963 Ensure the docker context inspect default is not executed in a different context, that might make it fail.
Following discussion with @simonferquel, this will strengthen the shell out to get default context, in cases the user has damaged his config file current context or there are issues with context synchronisation between windows host & wsl2.
2020-06-13 10:50:56 +02:00
Chad Metcalf
130cb87ec9
Add a target to run docker serve
It documents how to use it and just makes it easy.
2020-06-12 16:37:42 -07:00
Chad Metcalf
39f2093827
Update classic Docker location depending on OS.
Adding support for devs on WSL2 and Linux.
2020-06-12 16:29:41 -07:00
Guillaume Tardif
2e11b2148a
Merge pull request #206 from docker/fix_typo
Fix typo
2020-06-12 17:01:04 +02:00
Guillaume Tardif
f8ea0934f0 Align login success message with old cli (& with “canceled” message) 2020-06-12 14:50:35 +02:00
Guillaume Tardif
3c2eb067bc Fix typo in DOCKER ENPOINT 2020-06-12 14:50:35 +02:00
Guillaume Tardif
d9b4564533
Merge pull request #203 from docker/fix_TestKillChild
Fix flaky test (subject to running tests in //)
2020-06-11 15:30:14 +02:00
Guillaume Tardif
9d4eed2356 Fix flaky test (subject to running tests in //) 2020-06-11 15:06:39 +02:00
Guillaume Tardif
3ad1e699a2
Merge pull request #198 from docker/windows_e2e
Windows e2e tests
2020-06-11 13:51:33 +02:00
Guillaume Tardif
93623dc5aa
Merge pull request #200 from docker/context_store_type
Store context type in metadata to make retrocompatibility with previous contexts easier (potentially switching back and forth)
2020-06-11 13:34:05 +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
6bfdded047 Windows CI 2020-06-11 10:44:30 +02:00
Guillaume Tardif
f3f6bff583 Fix linter 2020-06-11 10:44:30 +02:00
guillaume.tardif
df6fc2f18f Fix volume path setting for linux containers from windows host 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
07a29e2d0e
Merge pull request #201 from docker/fix_delegate_errors
Do not delegate to old cli if cobra fails before invoking the PreRun or SetHelp hook.
2020-06-10 18:24:23 +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
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
8930563a25
Merge pull request #194 from docker/dependabot/go_modules/github.com/onsi/gomega-1.10.1
Bump github.com/onsi/gomega from 1.9.0 to 1.10.1
2020-06-10 02:12:45 -07:00
dependabot-preview[bot]
fa5b3b2291
Bump github.com/onsi/gomega from 1.9.0 to 1.10.1
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.9.0 to 1.10.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.9.0...v1.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-10 09:07:30 +00:00
Djordje Lukic
956237430d
Merge pull request #199 from docker/fix_login_error
Fix login error when login to an azure account having no associated tenant.
2020-06-10 02:04:35 -07:00
Djordje Lukic
f236c5fa45
Merge pull request #193 from docker/dependabot/go_modules/github.com/Azure/go-autorest/autorest/adal-0.8.3
Bump github.com/Azure/go-autorest/autorest/adal from 0.8.2 to 0.8.3
2020-06-10 02:03:45 -07:00
Djordje Lukic
1639834429
Merge pull request #196 from rumpl/feat-store-grpc-context
Add the store to the gRPC context
2020-06-10 02:03:32 -07:00
Guillaume Tardif
819a7389f7 Fix login error when login to an azure account having no associated tenant.
This was encountered by @lorenrh with stack : 
```
docker login azure
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/docker/api/azure/login.AzureLoginService.Login(0xc0004cc2a0, 0x2d, 0xe8b8a0, 0x1476830, 0xe8e4e0, 0xc000498ff0, 0x0, 0x0)
        github.com/docker/api/azure/login/login.go:130 +0x1057
github.com/docker/api/azure.(*aciCloudService).Login(0xc0004888c0, 0xe8e4e0, 0xc000498ff0, 0x0, 0xe82720, 0xc0004888c0)
        github.com/docker/api/azure/backend.go:283 +0x64
github.com/docker/api/cli/cmd/login.cloudLogin(0xc0004eb600, 0xd422a4, 0x3, 0x1, 0xffffffffffffffff)
        github.com/docker/api/cli/cmd/login/login.go:53 +0xae
github.com/docker/api/cli/cmd/login.runLogin(0xc0004eb600, 0xc00049c5f0, 0x1, 0x1, 0x0, 0x0)
        github.com/docker/api/cli/cmd/login/login.go:39 +0x15e
github.com/spf13/cobra.(*Command).execute(0xc0004eb600, 0xc00049c5d0, 0x1, 0x1, 0xc0004eb600, 0xc00049c5d0)
        github.com/spf13/cobra@v1.0.0/command.go:842 +0x45a
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004a8580, 0xc000498fc0, 0xc41160, 0x1476830)
        github.com/spf13/cobra@v1.0.0/command.go:950 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.0.0/command.go:887
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        github.com/spf13/cobra@v1.0.0/command.go:880
main.main()
        github.com/docker/api/cli/main.go:167 +0x68f
```
2020-06-10 10:15:03 +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
dependabot-preview[bot]
4b9bdd0e4b
Bump github.com/Azure/go-autorest/autorest/adal from 0.8.2 to 0.8.3
Bumps [github.com/Azure/go-autorest/autorest/adal](https://github.com/Azure/go-autorest) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/Azure/go-autorest/releases)
- [Changelog](https://github.com/Azure/go-autorest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Azure/go-autorest/compare/autorest/adal/v0.8.2...autorest/adal/v0.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 07:59:55 +00:00
Chris Crone
a47a2d39c3
Merge pull request #195 from docker/chore-dependabot-daily
Run dependabot daily instead of weekly
2020-06-09 09:58:49 +02:00
Djordje Lukic
43a607a4af
Merge pull request #192 from docker/dependabot/go_modules/github.com/stretchr/testify-1.6.1
Bump github.com/stretchr/testify from 1.5.1 to 1.6.1
2020-06-09 00:55:18 -07:00
Djordje Lukic
9c21e09044 Run dependabot daily instead of weekly
Hopefully we will have less PRs at the same time if it looks daily.
2020-06-09 09:45:57 +02:00
dependabot-preview[bot]
63bdcad79e
Bump github.com/stretchr/testify from 1.5.1 to 1.6.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.5.1 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.5.1...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-08 21:26:19 +00:00
Djordje Lukic
574a378886
Merge pull request #182 from rumpl/feat-context-server
Feat context server
2020-06-08 07:47:35 -07: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
22d4d250a9 Move the config into own package and outside of cli 2020-06-08 16:01:36 +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
660e61ad6d
Merge pull request #169 from docker/container_id_display
Do not truncate ACI container IDs
2020-06-08 13:50:04 +02: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
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
e604e7efc9
Merge pull request #181 from rumpl/fix-logs
Use stdcopy if the container doesn't have a tty
2020-06-08 00:34:05 -07:00
Guillaume Tardif
4700364667
Merge pull request #180 from docker/unknown_comand_error
Display friendly message if unknown command is available in default context
2020-06-08 09:25:18 +02:00
Djordje Lukic
31a0716c87 Use stdcopy if the container doesn't have a tty 2020-06-08 08:46:30 +02:00
Djordje Lukic
e81c7ae8e3
Merge pull request #185 from docker/dependabot/go_modules/github.com/Azure/azure-sdk-for-go-42.3.0incompatible
Bump github.com/Azure/azure-sdk-for-go from 42.0.0+incompatible to 42.3.0+incompatible
2020-06-06 15:13:44 -07:00