Docker

How to Install Docker Compose on Ubuntu 20.04


Docker Compose is a utility that helps to define, visualize, and rung multiple applications. It is a tool for building isolated containers through the YAML file to modify your application’s services.

Docker Compose allows running multiple copies of the environment in a single host with single host application deployments and automation testing.

Through compose, you can use existing containers, which means modifications can be made anytime.

Install Docker Compose on Ubuntu 20.04 from Ubuntu Repository

The Ubuntu repository will provide a stable version and easy updates of the Docker Compose tool.

Open up your terminal and type command to start installing Docker utility from the official repository:

$ sudo apt install docker-compose

Downloading and installation will be completed after few seconds.

Now, to verify if it is installed on your system, type the command in terminal:

$ docker-compose version

Install Docker Compose on Ubuntu 20.04 using GitHub Repository

On the GitHub repository, you will get the updates of Docker Compose, which might not be available on the standard Ubuntu repository.

If you want to install an updated version of the Docker utility, copy the following source code from GitHub:

$ sudo wget –O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.25.0/docker-compose-Linux-x86_64

Use the given command to assign permission to the executable file:

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

Permission will be applied to the executable file after this command.

Now, check its version using the mentioned command:

$ docker-compose --version

How to uninstall Docker Compose from Ubuntu 20.04?

Docker-compose tool can be deleted from the system when we remove its binary.

To uninstall it, the below-given command will be used:

$ sudo rm /usr/local/bin/docker-compose

Conclusion

Docker Compose is a utility that provides a lightweight environment to build and run an application without any interference. This tool provides the functionality of portability and automation testing.

We have got an idea of how to install Docker Compose through the standard Ubuntu repository and its latest version from GitHub.

About the author

Avatar

Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.