티스토리 뷰

반응형

■ Docker Compose 설치

Docker Compose 버전 확인: https://github.com/docker/compose/releases

 

Releases · docker/compose

Define and run multi-container applications with Docker - docker/compose

github.com

# Docker Compose 1.27.2 버전 설치
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

# 바이너리에 실행 권한 추가
sudo chmod +x /usr/local/bin/docker-compose

# Docker Compose 설치 확인
docker-compose -v

 

`docker-compose` 명령어를 실행했을 때, `bash: /usr/bin/docker-compose: 그런 파일이나 디렉터리가 없습니다

`와 같은 오류가 발생하면 다음 명령을 실행해 심볼릭 링크를 추가해주어야 합니다.

# 심볼릭 링크 추가
ln -sf /usr/local/bin/docker-compose /usr/bin/docker-compose

 

실행 결과:

hyper@ubuntu:~$ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   633  100   633    0     0   1401      0 --:--:-- --:--:-- --:--:--  1403
100 11.6M  100 11.6M    0     0   468k      0  0:00:25  0:00:25 --:--:--  645k

hyper@ubuntu:~$ sudo chmod +x /usr/local/bin/docker-compose

hyper@ubuntu:~$ docker-compose -v
bash: /usr/bin/docker-compose: 그런 파일이나 디렉터리가 없습니다

hyper@ubuntu:~$ sudo ln -sf /usr/local/bin/docker-compose /usr/bin/docker-compose

hyper@ubuntu:~$ docker-compose -v
docker-compose version 1.27.2, build 18f557f9

 

■ Docker Compose 제거

# Docker Compose 제거
sudo rm /usr/local/bin/docker-compose

# Docker Compose 제거 확인
docker-compose -v

 

실행 결과:

hyper@ubuntu:~$ sudo rm /usr/local/bin/docker-compose

hyper@ubuntu:~$ docker-compose -v
bash: /usr/bin/docker-compose: 그런 파일이나 디렉터리가 없습니다
반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함