0

I want to run a special version of docker.

I tried to upgrade Docker and Docker Compose by following commands:

# upgrade docker
sudo apt-get update
sudo apt-get upgrade docker-ce

# upgrade docker compose
sudo rm /usr/local/bin/docker-compose
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d')
DESTINATION=/usr/local/bin/docker-compose
sudo chmod 755 $DESTINATION

After that:

% docker --version
Docker version 20.10.2, build 2291f61

% docker-compose --version
Docker Compose version v2.7.0

how can I upgrade the docker version to a special version (e.g. 20.10.17)?

1
  • 20.10.17 currently is not a "special" version other than it being the latest version. Is that what you want?
    – Dan
    Jul 26, 2022 at 10:45

1 Answer 1

1

The official documentation will tell you exactly how to install the latest version from the official Docker repositories.

After you have added the correct repo, run:

 sudo apt-get update
 sudo apt-get install docker-ce docker-ce-cli containerd.io

For Docker Compose, the official documentation states that the best way to install the Docker Compose CLI plugin:

 sudo apt-get update
 sudo apt-get install docker-compose-plugin

This will give you Docker v. 20.10.17 and Docker Compose v. 2.6.0. This is the latest version of Docker Compose in the repo.

If you want to install it manually your way to get v. 2.7.0 that's also fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.