0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

docker / docker-compose バージョン指定 インストール (アップ|ダウン)

Last updated at Posted at 2021-01-05

インストール 覚え書き

function version () {
  [ -e $1 ] && $1 -v | sed -r 's/.* ([\.0-9]+), .*$/\1/'
}

VER=19.03.8
BIN=/usr/bin/docker
if [ $(version $BIN) != $VER ]; then
  curl -s -fsSL https://get.docker.com \
    | sed 's/sleep [0-9]*//' \
    | sed 's/apt-get install/apt-get install --allow-downgrades/' \
    | VERSION=${VER} sh
fi

VER=1.24.1
BIN=/usr/bin/docker-compose
if [ $(version $BIN) != $VER ]; then
  URL=https://github.com/docker/compose/releases/download/${VER}/docker-compose-$(uname -s)-$(uname -m)
  curl -s -L $URL -o ${BIN}
  chmod +x ${BIN}
fi

リリースノート

https://docs.docker.com/engine/release-notes/
https://docs.docker.com/compose/release-notes/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?