Solution: 1. Use the "dnf install docker-compose" command to install "docker-compose" in the fedora system; 2. Use "yum install docker-compose" in the "CentOS 7/RHEL7" system Just install it with the command; 3. Use the "apt-get install docker-compose" command to install it in Debian and its variants such as Ubuntu systems.
The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.
When I need to use docker-compose, an error is reported: -bash: docker-compose: command not found
It is because the server docker-compose is not installed and needs to be installed.
Prioritize using docker-compose provided by your server distribution for installation. You can use the following command:
dnf install docker-compose # fedora yum install docker-compose # CentOS 7/ RHEL7 apt-get install docker-compose # debian及其变种如Ubuntu apk add docker-compose # alpine pacman -S docker-compose # arch
Expand knowledge
Solve the docker-compose command does not exist, command not found error
1.Install the extension source
sudo yum -y install epel-release
2.Install the python-pip module
sudo yum install python-pip
3.View docker-compose Version
docker-compose version
# prompts that the command is not found
4. Install with the command
Recommended learning: "docker video Tutorial》
The above is the detailed content of What to do if the docker-compose command does not exist. For more information, please follow other related articles on the PHP Chinese website!