Commit Graph

2271 Commits

Author SHA1 Message Date
Guillaume Tardif 4a4b62ded2 Do not allow context creation for unknown types 2020-06-04 16:44:08 +02:00
Guillaume Tardif e77513c1c8
Merge pull request #165 from docker/azure_private_images
Allow pulling private images from hub or other registries
2020-06-04 15:43:42 +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 e5335adedd Azure: Refactor login errors
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-04 10:20:39 +02:00
Guillaume Tardif c37f666c07
Merge pull request #164 from docker/interactive_context_create
Interactive context create
2020-06-03 18:06:41 +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
Djordje Lukic dae54a3c1f
Merge pull request #166 from docker/grpc_container_errfix
Fix slight bug in error handling
2020-06-03 04:12:47 -07:00
Guillaume Tardif 1c94893d2f Fix slight bug in error handling 2020-06-03 12:20:49 +02:00
Guillaume Tardif 39140c8ea0 Refactoring, add unit test or various interactive context creation 2020-06-03 12:05:58 +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 11f1c057dc Allow pulling private images from hub or other registries, as long as the user is logged in against the registry(ies).
Registry creds are passed along with the ACI payload (cf https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-aci). 
Manually tested against hub & ACR private repo
2020-06-02 15:56:24 +02:00
Chris Crone 21b6a2ae71
Merge pull request #160 from chris-crone/dockerfile-improvements
Dockerfile improvements
2020-06-02 12:15:43 +02:00
Christopher Crone 654f9ebbaf Tidy Makefiles
* Make BINARY mutability explicit
* Default docker build output type is local so use this

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-02 11:58:29 +02:00
Christopher Crone 9920fe2284 Remove unused variables
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-02 11:58:29 +02:00
Christopher Crone 247fa56ee1 More Dockerfile best practices
* Use mounts for RUN commands to avoid creating extra layers
* Use built-in platform support

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-02 11:58:24 +02:00
Djordje Lukic 3a2e16dc7a
Merge pull request #163 from docker/chore-remove-backend
Remove unused backend proto
2020-06-02 00:56:37 -07:00
Guillaume Tardif ec5e61b645
Merge pull request #162 from docker/login_command
Move login to root command
2020-06-02 09:42:38 +02:00
Djordje Lukic 45b672a39d Remove unused backend proto 2020-06-02 09:41:57 +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 f1fb80ecc5
Merge pull request #161 from docker/context_inspect
Add docker context inspect command relying on classic docker
2020-05-29 15:51:10 +02:00
Djordje Lukic 6830724ab9
Merge pull request #159 from docker/fix_azure_login
Fix Azure login : no need for ACI context first
2020-05-29 06:23:27 -07:00
Guillaume Tardif 528d47ce08 Add docker context inspect command relying on classic docker 2020-05-29 12:02:14 +02:00
Guillaume Tardif 01aaec2dbe Fix Azure login : allow getting a backend when no corresponding context already exists with an explicit call from the login command. Will be usefull next for context creation with azure interactive things 2020-05-29 11:35:35 +02:00
Christopher Crone 9097b1f750 Add .git to .dockerignore
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-29 11:29:28 +02:00
Djordje Lukic 832651b1dc
Merge pull request #157 from docker/kill_child_process_on_cancel
Kill child process "docker-classic" on cancel
2020-05-28 04:53:47 -07:00
Guillaume Tardif c8acbc33fd
Merge pull request #158 from docker/azure_backend_dependency
Remove azure resourceGroupClient from backend initialisation.
2020-05-28 10:52:01 +02:00
Guillaume Tardif a948b6e1d0 Remove azure resourceGroupClient from backend initialisation. Several advantages :
- less dependencies to init backend. (Will need to work more on this to make login command not need an existing subscription ID)
- backend does not get login token at init time. For a long running process (grace server) this would cause issues with token lifetime
- we benefit from the client config (polling options especially) set in aci.go, without duplicating stuff
2020-05-28 10:16:42 +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
Djordje Lukic 4c4ebbdb56 Merge pull request #155 from docker/fix_shellout_no_error_message
Ensure we have a clear error message in case of wrong setup for docker-classic
2020-05-27 01:05:19 -07: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 d876f9e779
Merge pull request #153 from rumpl/chore-rename-cli-proto
Chore rename cli proto
2020-05-26 02:25:58 -07:00
Djordje Lukic 7e2d22f5ea Change the path to the contexts protos for node 2020-05-26 10:32:09 +02:00
Djordje Lukic cb14c05e74 Move the context server into own package
It had notthing to do in the cli package
2020-05-26 10:31:14 +02:00
Djordje Lukic b8658b3f54 Rename cli protos to contexts 2020-05-26 10:20:13 +02:00
Djordje Lukic e4b49912a7
Merge pull request #152 from rumpl/chore-dependabot
Add dependabot config file
2020-05-25 07:26:05 -07:00
Djordje Lukic 1304df2b1c
Merge pull request #151 from rumpl/feat-protos
Put all protos inside the `protos` package
2020-05-25 07:24:46 -07:00
Djordje Lukic bc1a932bd7 Add dependabot config file
It will check and update dependencies once a week
2020-05-25 15:11:29 +02:00
Djordje Lukic 129e675932 Put all protos inside the `protos` package 2020-05-25 15:04:28 +02:00
Chris Crone 5768ffd526
Merge pull request #148 from rumpl/feat-moby-ports
Add ports to the moby backend
2020-05-25 11:25:51 +02:00
Djordje Lukic 1c3673c421 Add moby backend e2e tests 2020-05-25 10:24:37 +02:00
Djordje Lukic 7b83047dc2
Merge pull request #147 from rumpl/feat-better-context
Change the way a context is stored
2020-05-25 01:11:31 -07: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 2dd98e8a74 Add ports to the moby backend 2020-05-22 16:15:57 +02:00
Djordje Lukic de33f183df
Merge pull request #139 from rumpl/feat-log-stream
Implement gRPC logging
2020-05-22 06:23:47 -07:00
Chris Crone 8f2c134c79
Merge pull request #145 from docker/feat-test-cache
Add buildkit cache when running unit tests
2020-05-22 13:30:11 +02:00
Djordje Lukic 5d073028be Add buildkit cache when running unit tests
Since running `go test` downloads dependencies we want to have them in
the builder cache
2020-05-22 13:26:30 +02:00