-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker: 'compose' is not a docker command
when installing using convenience scripts
#8630
Comments
Compose Switch is indeed a translator to offer a smooth transition for Linux installation is documented here: https://github.com/docker/compose/tree/v2#linux |
Thanks @ndeloof ok I get it now. FYI this is what I'm using in my Dockerfile to get a working docker client and V2
Build outputs:
|
@ndeloof @jamshid Sorry to bug you - I am trying to install docker compose V2 on Raspberry Pi OS, and I am experiencing the same issue: I get From the OP's reaction it seems a solution is suggested above, but it's too cryptic for me to understand :) It would be great to have some further instructions, if anything needs to be done differently than what is written in the docs, or if I need to do something extra after. All the best |
The instructions on the website assume installation on an x86_64 platform. Your Raspberry Pi will instead require an armhf / aarch64 binary. You'll need to run these commands instead:
|
Thank you so much @nathan-osman, that worked :) |
Keep in mind that for Ubuntu on a Raspberry Pi 2, at least, |
Note to self and others: if when trying to run docker compose you get an error like below, then set your system to Manage Docker as a non-root user. After that I didn't have the error any-more.
|
Thank you @nathan-osman ! 👍 |
Since this page is now ranking for sudo apt-get install docker-compose-plugin |
in case you installed docker and docker-compose v2 with homebrew on OSX and getting then you need to run these commands:
|
THANK YOU THANK YOU THANK YOU |
thanks @ruurtjan It's worked |
Thanks |
Adding to @dmshvetsov answer, if you use Homebrew to install docker-compose you can use its CLI to define the DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
ln -sfn $(brew --prefix docker-compose)/bin/docker-compose $DOCKER_CONFIG/cli-plugins/docker-compose You can also add echo -e "\nexport DOCKER_CONFIG=\${DOCKER_CONFIG:-\$HOME/.docker}" >> ~/.zshrc |
Install it using
Test it
|
Thanks, worked like a charm. |
I checked that the 'docker-compose' plugin was installed in the root user.
In that case:
sorry for my english |
The command below worked: sudo apt-get install docker-compose-plugin |
Any help on mac, tried Installing both |
arch: |
sudo apt-get install docker-compose-plugin |
Try with (Ubuntu 20.04.6):
|
@engrjislam please note |
@gopalmani If you have installed |
With Apple macbook Air you can directly install the same using the following dmg file easy setup and it works 100% |
Still not working. Just installed
|
None of the solutions above worked for me. The official documentation worked: https://docs.docker.com/engine/install/debian/ |
I had this problem because I use 2 users on macos. I had to manually run Docker Desktop on the 2nd user and go through initial setup before docker-compose started working on this user too. |
This did the trick for me on Ubuntu:
After that I was able to use docker compose like this:
Hope this helps |
Just to add information. You must make sure you have Docker Desktop open, otherwise the Docker engine and its plugins will not run. |
For Mac, if you install docker and the compose plugin with homebrew, the post install prompt helpfully gives the answer to add the below to "cliPluginsExtraDirs": [
"/opt/homebrew/lib/docker/cli-plugins"
] But the above symlink solution from dmshvetsov also worked. I went with the config.json though as advised by the plugin install. |
Description of the issue
I'm confused by the instructions for installing compose V2 on Linux and the convenience scripts don't result in a working
docker compose
.This is kinda complicated just to get a working
docker compose
, would be nice if it all worked with convenience scripts.Really my goal is to add the alias
docker-compose
(from https://github.com/docker/compose-switch) but I think I needdocker compose
working first?Context information (for bug reports)
docker compose ...
docker-compose ...
Output of
docker(-)compose version
Output of
docker version
Steps to reproduce the issue
I'm assuming I should be able to install the
docker
/docker compose
command line client inside a Linux container (I do that with docker and V1 docker-compose). Of course I'm only trying to run the docker client, the docker server is not running in the container.docker compose
work, but it does not.Observed result
docker: 'compose' is not a docker command.
Expected result
Additional information
Docker for Mac 4.0.2
The text was updated successfully, but these errors were encountered: