Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

'docker context update' returns error 'unknown flag: --docker' #811

Closed
wamonite opened this issue Oct 14, 2020 · 5 comments
Closed

'docker context update' returns error 'unknown flag: --docker' #811

wamonite opened this issue Oct 14, 2020 · 5 comments
Assignees
Labels
bug: regression ↩️ A new version of the app broke something. cli cli

Comments

@wamonite
Copy link

Description

Steps to reproduce the issue:

  1. Create an SSH context
$ docker context create test --docker "host=ssh://example.host"
test
Successfully created context "test"
  1. Update the SSH context
$ docker context update test --docker "host=ssh://another.host"
unknown flag: --docker

Describe the results you received:

The SSH context is not updated with the new host info. The SSH context needs to be deleted then recreated.

Describe the results you expected:

The SSH context should be updated with the new host info.

Additional information you deem important (e.g. issue happens only occasionally):

This error occurred on Docker for Mac. Another office Mac, which returns the same docker version output except without the Azure integration 0.1.15 line, works as expected.

Output of docker version:

Client: Docker Engine - Community
 Azure integration  0.1.15
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:41:33 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:27 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker info:

Client:
 Debug Mode: false

Server:
 Containers: 49
  Running: 6
  Paused: 0
  Stopped: 43
 Images: 903
 Server Version: 19.03.12
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 3
 Total Memory: 11.71GiB
 Name: docker-desktop
 ID: 4ELU:W453:YTHU:6CJR:5XUK:5JWH:BQRE:HUGP:5F2F:3WNJ:LAIQ:UROQ
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 78
  Goroutines: 80
  System Time: 2020-10-14T16:41:49.447093367Z
  EventsListeners: 5
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

Additional environment details (AWS, VirtualBox, physical, etc.):

Docker for Mac.

@chris-crone
Copy link
Contributor

Thanks for the report @wamonite. You can deactivate the Compose CLI in the preferences of Docker Desktop for Mac by toggling the Enable cloud experience switch (where it is exactly depends on which version of Docker Desktop you're running.

Is this a workflow that you use often?

@chris-crone chris-crone transferred this issue from docker/cli Oct 19, 2020
@chris-crone chris-crone added the bug: regression ↩️ A new version of the app broke something. label Oct 19, 2020
@wamonite
Copy link
Author

Thanks @chris-crone, disabling the cloud experience did indeed fix this issue.

SSH contexts are a workflow we're now using often, and we've automated creating/updating user contexts. While the issue surprised us, it was worked around by deleting and recreating contexts, so a fix is nice-to-have rather than required.

@chris-crone chris-crone added the cli cli label Oct 20, 2020
@nebuk89
Copy link

nebuk89 commented Oct 20, 2020

@wamonite would you be interested in giving us some more feedback about how you are using Contexts and chat around some future ideas we have 👀 drop me an email on bengotch@docker.com if so, thanks!

@gtardif
Copy link
Contributor

gtardif commented Oct 29, 2020

That error on docker context update command is fixed in https://github.com/docker/compose-cli/releases/tag/v1.0.0. Soon to be released as part of Docker Desktop (coming up next week).
Thx for the feedback! Feel free to reopen if you still experience issues with compose-cli v1.0.0.

@gtardif gtardif closed this as completed Oct 29, 2020
@marcosdiasdev
Copy link

marcosdiasdev commented Aug 5, 2021

I'm using Docker for Mac v. 20.10.7 and I went through the same problem described in this issue while trying to create a context called ecs. The following command returns unknown flag: --docker:

docker context create ecs --docker "host=ssh://myusername@myhost"

But the following just works:

docker context create myenv --docker "host=ssh://myusername@myhost"

I just realized ecs is a valid parameter for docker context create and that's why I couldn't create a context called ecs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: regression ↩️ A new version of the app broke something. cli cli
Projects
None yet
Development

No branches or pull requests

5 participants