Docker가 설치되어 있지만 Docker Compose는 설치되어 있지 않습니까? 왜?
다음 명령을 실행하여 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
Raspbian 8과 함께 Raspberry Pi 3에 설치하고 있습니다. curl 메서드가 실패했고 ( line 1: Not: command not found
요청시 오류가 발생했습니다 docker-compose --version
) @ sunapi386의 솔루션이 약간 구식 인 것처럼 보였으므로이 작업을 시도했습니다.
먼저 이전 작업에서 정리 :
sudo rm /usr/local/bin/docker-compose
sudo pip uninstall docker-compose
그런 다음 Rpi에서 docker-compose를 다시 작성하십시오 .
sudo apt-get -y install python-pip
sudo pip install docker-compose
저에게 (2017 년 11 월 1 일)이 결과는 다음에 대한 다음과 같은 응답을 가져옵니다 docker-compose --version
.
docker-compose version 1.16.1, build 6d1ac219
Raspbian OS의 Raspberry Pi 3에 설치하고 있습니다. curl
방법은 유효한 응답에 해결되지 않았다. 또한 {error: Not Found}
, URL을 살펴 봤는데 https://github.com/docker/compose/releases/download/1.11.2/docker-compose-Linux-armv7l
유효하지 않았습니다. 거기에는 빌드가 없었던 것 같아요.
이 가이드 https://github.com/hypriot/arm-compose 가 저에게 효과적이었습니다.
sudo apt-get update
sudo apt-get install -y apt-transport-https
echo "deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ jessie main" | sudo tee /etc/apt/sources.list.d/hypriot.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 37BBEE3F7AD95B3F
sudo apt-get update
sudo apt-get install docker-compose
다음과 같이 공식 저장소를 저장소 목록에 추가하여 docker 를 설치 한 경우 :
curl -L https://nightly.odoo.com/odoo.key | apt-key add -
sudo echo "deb http://nightly.odoo.com/10.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
sudo apt-get update && sudo apt-get install odoo
그냥 해:
$ sudo apt-get install docker-compose
RHEL 기반 배포판 / Fedora의 경우 :
$ sudo dnf install docker-compose
먼저 docker-compose가 설치되어 있는지 확인하십시오.
$ docker-compose -v
설치되지 않은 경우 설치 가이드 https://docs.docker.com/compose/install/을 참조하십시오. 설치 되어있는 경우 바이너리에 실행 권한을 부여하십시오.
$ chmod +x /usr/local/bin/docker-compose
check if this works.
Refered to the answers given above (I do not have enough reputation to refer separately to individual solutions, hence I do this collectively in this place), I want to supplement them with some important suggestions:
docker-compose you can install from the repository (if you have this package in the repository, if not you can adding to system a repository with this package) or download binary with use curl - totourial on the official website of the project - src: https://docs.docker.com/compose/install /
docker-compose from the repository is in version 1.8.0 (at least at me). This docker-compose version does not support configuration files in version 3. It only has version = <2 support. Inthe official site of the project is a recommendation to use container configuration in version 3 - src: https://docs.docker.com/compose/compose-file / compose-versioning /. From my own experience with work in the docker I recommend using container configurations in version 3 - there are more configuration options to use than in versions <3. If you want to use the configurations configurations in version 3 you have to do update / install docker-compose to the version of at least 1.17 - preferably the latest stable. The official site of the project is toturial how to do this process - src: https://docs.docker.com/compose/install/
when you try to manually remove the old docker-compose binaries, you can have information about the missing file in the default path
/usr/local/bin/docker-compose
. At my case, docker-compose was in the default path /usr/bin/docker-compose. In this case, I suggest you use the find tool in your system to find binary file docker-compose - example syntax:sudo find / -name 'docker-compose'
. It helped me. Thanks to this, I removed the old docker-compose version and added the stable to the system - I use the curl tool to download binary file docker-compose, putting it in the right path and giving it the right permissions - all this process has been described in the posts above.
Regards, Adam
Installing docker doesn't mean that you've installed docker-compose. It has as prerequisitions that you've already installed the docker engine which you've already done. After that you're able to install docker-compose following this link for Centos 7.
docker-compose is currently a tool that utilizes docker(-engine) but is not included in the distribution of docker.
Here is the link to the installation manual: https://docs.docker.com/compose/install/
TL;DR:
curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/bin/docker-compose
(1.8.0 will change in the future)
I suggest using the official pkg on Mac. I guess docker-compose is no longer included with docker by default: https://docs.docker.com/toolbox/toolbox_install_mac/
The above solutions didn't work for me. But I found this that worked:
sudo apt-get update -y && sudo apt-get install -y python3-pip python3-dev
sudo apt-get remove docker docker-engine docker.io
curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo pip3 install docker-compose
#sudo docker-compose -f docker-compose-profess.yml pull ofw
sudo usermod -a -G docker $USER
sudo reboot
참고URL : https://stackoverflow.com/questions/36685980/docker-is-installed-but-docker-compose-is-not-why
'programing' 카테고리의 다른 글
확인 대화 상자로 ActionLink 삭제 (0) | 2020.08.26 |
---|---|
Rails 4에서 has_many : through : uniq 사용시 사용 중단 경고 (0) | 2020.08.26 |
이미 대상 브랜치에있는 커밋을 보여주는 GitHub 풀 요청 (0) | 2020.08.25 |
boost :: flat_map 및 map 및 unordered_map과 비교 한 성능 (0) | 2020.08.25 |
Pip을 사용하여 Anaconda 환경에 패키지 설치 (0) | 2020.08.25 |