compose: docker --context default compose reports unknown docker command: "compose compose" for 2.0.1 but not 2.0.0
I’m going to ignore the instructions due to lack of time. Please close this issue immediately if this does not benefit the community. I wasn’t able to find this in previous issues which I find very surprising.
After installing 2.0.1 over 2.0.0 (via overwriting ~/.docker/cli-plugins/docker-compose with the release binary), the command: docker --context default compose
reports the usage / help text but the bottom says:
unknown docker command: “compose compose”
Ubuntu 20.10 x86_64 5.8.0-63-generic virtualbox-from-windows10 Server version 20.10.8 runc version: v1.0.1-0-g4144b63 Experimental: true
This “unknown docker command” happens for every docker compose command that passes in --context default
. It does not happen if I leave out that switch.
If it’s user error, the error message needs to speak more truth than accusing me of typing compose twice.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 10
- Comments: 18 (1 by maintainers)
Actually, setting
DOCKER_CONTEXT
also works. (forDocker Compose version v2.1.1
):hat-tip: Thank you @W1M0R 🙇
While this syntax got the error:
This syntax succeeded:
Same result on 2.1.1 🤦♂️
Confirmed fixed by OP in 2.2.3 (did not try 2.2.2). Feel free to close.
P.S. THANK YOU!
You could drop the
--context
parameter, and then export the DOCKER_HOST environment variable explicitly.