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

Linux Docker에 Docker Compose V2 설치하기.

달소 달소 1560

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

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

취소 댓글 등록

신고

"님의 댓글"

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

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story

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

서버구축 게시판 이동하기
분류 제목 글쓴이 날짜 조회 추천
공지 서버OS(ESXi/Linux/Router 등) 게시판 이용안내. 달소 21.11.16.17:43 586 +1
ESXi 공지 ESXi 관련 추천글 모음 5 달소 21.04.23.12:19 3760 +6
ESXi USB LAN으로 ESXi8 설치하기.(Feat. Realtek LAN) 15 달소 23.01.01.18:51 2186 +2
Assistant OS 당신이 알아야할 새로운 스탠다드 Matter란 무엇인가 5 DarkAcid 22.12.30.02:38 739 +1
Proxmox 인텔 igpu는 gvt-g를 이용해 두개 이상의 가상머신에 패스스루 해줄 수 있네요. 13 니즛 22.12.23.02:19 1380 +1
Linux
image
달소 23.01.05.10:23 365 0
Linux
image
콜라 23.01.03.23:07 622 0
Linux
image
달소 22.11.01.01:16 3314 +2
Linux
image
달소 22.07.25.17:04 503 0
Linux
image
달소 22.07.25.16:48 42 0
Linux
image
달소 22.07.25.11:23 559 +1
Linux
image
달소 22.07.16.20:46 151 0
Linux
image
달소 22.07.16.18:09 11069 +2
Linux
image
달소 22.07.15.14:41 2506 +1
Linux
image
달소 22.07.13.12:08 631 0
Linux
image
달소 22.06.20.11:45 297 +2
Linux
image
달소 22.06.17.11:41 1728 +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 468 +2
Linux
image
달소 22.05.12.10:58 1900 +2
Linux
image
달소 22.05.11.22:32 1741 +4
Linux
image
FocalFossa 22.03.25.10:10 679 +4
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 1560 0
Linux
image
달소 21.12.06.23:14 793 0
Linux
image
달소 21.12.06.22:58 1691 +1
Linux
image
달소 21.12.06.22:24 339 0
Linux
image
달소 21.12.01.18:09 460 0
Linux
image
달소 21.12.01.17:23 134 0
Linux
image
달소 21.11.24.15:14 832 0
Linux
image
달소 21.11.24.14:58 3661 +1
Linux
image
달소 21.10.13.16:44 258 +2
Linux
image
올리고당 21.08.25.10:10 148 +1
Linux
image
달소 21.08.18.22:29 98 0
Linux
image
달소 21.08.14.13:35 152 0
Linux
image
달소 21.08.09.12:01 93 0
Linux
image
달소 21.06.25.15:43 197 +1
Linux
image
달소 21.06.22.13:19 818 0
Linux
image
달소 21.06.16.13:26 107 0
Linux
image
달소 21.06.09.15:58 338 0
Linux
image
달소 21.06.09.15:16 270 0
Linux
image
썩은준치 21.02.10.12:15 551 +1
Linux
image
달소 21.02.04.23:43 231 0
Linux
image
달소 21.01.27.15:18 204 0
Linux
image
달소 21.01.26.13:25 256 0
Linux
image
달소 21.01.06.15:38 1420 0
Linux
image
달소 21.01.02.13:32 1838 0