[Ubuntu]古いバージョンのdockerのインストール方法

ある機能が現バージョンは動かなかったりで、昔のdockerをインストールすることがあった。 パッケージレポを設定して、apt-cache policyでイントールできるバージョンを確認して、現行のをアンインストールして、該当パッケージを入れるだけ。

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
# to show package list that can be installed
sudo apt-cache policy docker-ce
# delete current one
sudo apt-get purge docker-ce -y
sudo apt-get install -y docker-ce=17.06.2~ce-0~ubuntu

Related Posts