docker-compose 최신버젼 설치

sangwoo noh·2022년 7월 22일
0

Docker

목록 보기
14/22
post-custom-banner

Docker-compose upgrade

$ docker-compose  -v
docker-compose version 1.17.1, build unknown
  • 첫번째 에러
    ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
  • 두번째 에러
    ERROR: Invalid published port: 8051-8053
    등 ㅅㅂ 문제가 있어서

docker-compose를 최신 버전으로 설치

기존 docker-compose 설치 버전 삭제

$ sudo apt-get remove docker-compose -y

jq library 설치

  • github에서 최신 버젼 읽어오는 용도로 확실하게 타겟 잡아서 가져오려고
$ sudo apt install jq

docker-compose 최신 버전 설치

// check latest version
$ VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
$ DESTINATION=/usr/bin/docker-compose
// download latest version
$ sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
// chmod set
$ sudo chmod 755 $DESTINATION
// versionn check
$ docker-compose -v
Docker Compose version v2.7.0
$ sudo curl -L https://github.com/docker/compose/releases/download/$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose

$ sudo chmod 755 /usr/bin/docker-compose
profile
하기로 했으면 하자
post-custom-banner

0개의 댓글