I can check if docker
is installed through the which docker
or command -v docker
commands. But I need to check if docker’s compose
plugin is installed (I will use it like docker compose up -d
later).
I can check if docker
is installed through the which docker
or command -v docker
commands. But I need to check if docker’s compose
plugin is installed (I will use it like docker compose up -d
later).
3
Answers
You can just check for docker-compose version
docker-compose --version
If docker-compose is not installed, It will throw an error docker-compose in unrecognized.
Write on terminal:
The return would look like:
Source: https://docs.docker.com/engine/reference/commandline/compose/
For me it worked a little bit differently,
docker compose --version
just gave me the CLI options of docker.I am using Ubuntu 22.04.01 LTS and I followed these instructions from Docker for installation.
⚠️ Note
Beware that Docker is currently transitioning from Compose
v1
tov2
. The older version is calleddocker-compose
which version you can check with: