已安装Docker但未安装Docker Compose吗?为什么?
我通过运行以下命令在centos 7上安装了docker,
curl -sSL https://get.docker.com/ | shsystemctl enable docker && systemctl start docker
docker run hello-world
但是,当我尝试运行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-composesudo mv /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
以上是 已安装Docker但未安装Docker Compose吗?为什么? 的全部内容, 来源链接: utcz.com/qa/420061.html