How to install docker compose on ubuntu

To install Docker Compose on Ubuntu, you can follow these steps:

  1. Update the package list by running the command: sudo apt update

  2. Install the required dependencies by running the command:

    sudo apt install curl unzip

  3. Download the latest stable release of Docker Compose by running the command:

    sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

    This command will download the binary file for Docker Compose and save it in the /usr/local/bin/ directory.

  4. Make the Docker Compose binary executable by running the command:

    sudo chmod +x /usr/local/bin/docker-compose

  5. Verify that Docker Compose is installed correctly by running the command:

    docker-compose --version

    This should display the version number of Docker Compose installed on your system.

That's it! Docker Compose is now installed on your Ubuntu system and ready to use.

 

OPTION 2

 

using apt to install docker compose

You can also install Docker Compose using apt package manager on Ubuntu by following these steps:

  1. Update the package list by running the command: sudo apt update

  2. Install Docker Compose by running the command:

    sudo apt install docker-compose

  3. Verify that Docker Compose is installed correctly by running the command:

    docker-compose --version

    This should display the version number of Docker Compose installed on your system.

That's it! Docker Compose is now installed on your Ubuntu system and ready to use. Note that the version of Docker Compose available in the apt repository may not be the latest version. If you need the latest version, you can follow the steps in my previous answer to download and install it manually.

If you need assistance with your projects feel free to email me at info@airgad.com or whatsapp Jesse stay safe!