• 돌아가기
  • 아래로
  • 위로
  • 목록
  • 댓글
Linux

Linux Docker에 Docker Compose V2 설치하기.

달소 달소 1569

0

0

안녕하세요. 달소입니다.


앞서 간단하게 소개해드린 Docker Compose V2를 Linux에서 설치하는방법입니다.

 

윈도우와 맥에서는 기본적으로 최신버전 Docker 설치시에 같이 설치가 되니 따로 진행하실 내용은 없으시며 Cent OS,Ubuntu 등 리눅스 사용자 분들만 따라와주시면 되겠습니다.

image.png.jpg

 

설치 환경

Ubuntu 20.04.3 LTS

Docker 20.10.12 최신버전

image.png.jpg

 

Ubuntu apt 패키지리스트에 있는 Docker-compose의 경우 1.25버전이기때문에 최신버전설치로해보겠습니다.

 

image.png.jpg

 

 

docker-compose V2 최신버전 다운로드받기

2021/12/24 크리스마스 이브 기준 최신버전은 2.2.2 버전입니다~

https://github.com/docker/compose/releases/tag/v2.2.3

What's Changed compose images should list images of created containers by @kiniou in #8990 Ignor...

 

아래처럼 많은 플랫폼을 지원하지만 저희가 받을건 Linux x64 입니다.

image.png.jpg

 

먼저 사용하고계신 리눅스 터미널로 접근을해서 아래 명령어를 통해 파일을 다운로드해줍니다.

wget https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64

 

image.png.jpg

 

다운로드가 완료되면 mv 명령어를 통해 docker-compose 로 이름을 변경해주세요.

 

 mv docker-compose-linux-x86_64 docker-compose

 

image.png.jpg

 

이제 도커 cli-plugins에 이파일을 이동시켜주면 되는데요.

설치환경마다 아래 cli-plugins의 폴더위치가 다르니 아래처럼 find / -name cli-plugins 명령어로 확인해주세요

 

image.png.jpg

 

mv docker-compose /usr/libexec/docker/cli-plugins/

chmod +x /usr/libexec/docker/cli-plugins/docker-compose

 

image.png.jpg

 

사용방법은 이전처럼 docker-compose 로 사용하는게아니라

docker compose 이렇게 띄워서 쓰셔야합니다.

 

image.png.jpg

 

버전 확인도 잘되네요.

 

테스트용 portainer 설치하기

테스트용으로 portainer를 한번 설치해보겠습니다.

 

mkdir -p /data/portainer/data

 

vi /data/portainer/docker-compose.yml

 

version: '2'

services:
  portainer:
    image: portainer/portainer
    command: -H unix:///var/run/docker.sock
    restart: always
    ports:
      - 9000:9000
      - 8000:8000
      - 9443:9443
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /data/portainer/data:/data

 

image.png.jpg

 

image.png.jpg

 

image.png.jpg

 

image.png.jpg

 

image.png.jpg

신고공유스크랩
0

달소 달소
98Lv. 194083P
다음 레벨까지 1937P


메인서버 - Ryzen 5700G / Proxmox 7.2 / Ubuntu / Xpenology / 기타 VM 등등
보조서버 - Intel i9-9900ES(QQC0) / H370M / Proxmox 7.1 / 아직개발용서버로 사용중
백업스토리지서버 - DS920+ 
하드웨어,가상화 등등 여러 IT분야에 관심이 두루두루많습니다만 깊게알고있는건 없습니다 하하하

댓글 쓰기 권한이 없습니다. 로그인

취소 댓글 등록

신고

"님의 댓글"

이 댓글을 신고하시겠습니까?

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story

본 게시판은 서버구축 게시판과 통합되었습니다.

서버구축 게시판 이동하기
분류 제목 글쓴이 날짜 조회 추천
공지 서버OS(ESXi/Linux/Router 등) 게시판 이용안내. 달소 21.11.16.17:43 588 +1
ESXi 공지 ESXi 관련 추천글 모음 5 달소 21.04.23.12:19 3768 +6
ESXi USB LAN으로 ESXi8 설치하기.(Feat. Realtek LAN) 15 달소 23.01.01.18:51 2195 +2
Assistant OS 당신이 알아야할 새로운 스탠다드 Matter란 무엇인가 5 DarkAcid 22.12.30.02:38 743 +1
Proxmox 인텔 igpu는 gvt-g를 이용해 두개 이상의 가상머신에 패스스루 해줄 수 있네요. 13 니즛 22.12.23.02:19 1387 +1
Linux
image
달소 23.01.05.10:23 367 0
Linux
image
콜라 23.01.03.23:07 630 0
Linux
image
달소 22.11.01.01:16 3335 +2
Linux
image
달소 22.05.12.10:58 1914 +2
Linux
image
달소 22.07.25.17:04 508 0
Linux
image
달소 22.07.25.11:23 561 +1
Linux
image
달소 22.07.25.16:48 42 0
Linux
image
달소 22.07.15.14:41 2521 +1
Linux
image
달소 22.07.16.18:09 11284 +2
Linux
image
달소 22.07.16.20:46 152 0
Linux
image
달소 22.07.13.12:08 632 0
Linux
image
달소 22.06.20.11:45 299 +2
Linux
image
달소 22.06.17.11:41 1738 +2
Linux
image
나스초보 22.06.13.14:07 160 0
Linux
image
KelvinKang 22.05.18.11:15 429 +1
Linux
image
KelvinKang 22.05.18.09:03 471 +2
Linux
image
달소 22.05.11.22:32 1749 +4
Linux
image
FocalFossa 22.03.25.10:10 683 +4
Linux
image
달소 21.10.13.16:44 259 +2
Linux
image
달소 22.03.04.17:16 352 0
Linux
image
달소 22.02.04.22:47 147 +1
Linux
image
달소 21.12.24.15:39 1569 0
Linux
image
달소 21.12.06.23:14 796 0
Linux
image
달소 21.12.06.22:58 1698 +1
Linux
image
달소 21.12.06.22:24 340 0
Linux
image
달소 21.12.01.17:23 134 0
Linux
image
달소 21.12.01.18:09 460 0
Linux
image
달소 21.11.24.14:58 3684 +1
Linux
image
달소 21.11.24.15:14 832 0
Linux
image
달소 21.01.02.13:32 1838 0
Linux
image
달소 21.01.06.15:38 1428 0
Linux
image
달소 21.01.26.13:25 256 0
Linux
image
달소 21.01.27.15:18 204 0
Linux
image
달소 21.02.04.23:43 232 0
Linux
image
썩은준치 21.02.10.12:15 554 +1
Linux
image
달소 21.06.09.15:16 273 0
Linux
image
달소 21.06.09.15:58 338 0
Linux
image
달소 21.06.16.13:26 108 0
Linux
image
달소 21.06.22.13:19 818 0
Linux
image
달소 21.06.25.15:43 197 +1
Linux
image
달소 21.08.09.12:01 93 0
Linux
image
달소 21.08.14.13:35 152 0
Linux
image
달소 21.08.18.22:29 98 0
Linux
image
올리고당 21.08.25.10:10 148 +1