我通过运行以下命令在centos 7上安装了docker,
curl -sSL https://get.docker.com/ | sh systemctl enable docker && systemctl start docker docker run hello-world
注意:helloworld正常运行,没有问题。
但是,当我尝试运行docker-compose(docker- compose.yml存在且有效)时,它仅在Centos上给我错误(Windows版本对于docker-compose文件运行良好)
/usr/local/bin/docker-compose: line 1: {error:Not Found}: command not found
您还需要安装Docker Compose。请参阅手册。这是您需要执行的命令
sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo mv /usr/local/bin/docker-compose /usr/bin/docker-compose sudo chmod +x /usr/bin/docker-compose