docker,

How to install Docker Compose on ARM64

Jul 12, 2021 · 2 mins read · Post a comment

In some of the previous posts I’ve covered how you can install Docker Compose on Linux distributions like Rocky Linux for example. It’s pretty easy to set it up, right?! Usually when we spin up instances in the cloud we are working with x86_64 processors instruction set under the hood. But, if we try to install Docker Compose on instance running on arm64 following the default installation instructions, we’ll get an error.

This is because there is no Docker Compose binary available for arm64 instruction set, at least not in the latest release at the time of writing, which is version v.1.0.17. There are a few ways we can get Docker Compose installed and running on arm64. Let’s see it in the following steps below.

Note(s): Compose v2 (pre-release) has arm7 and arm64 binaries available.

Prerequisites

  • ARM64 Linux distribution
  • sudo privileges

Install Docker Compose using pip

You need to have pip or pip3 installed. Then, just run the following code:

pip install docker-compose
or
pip3 install docker-compose

Install Docker Compose as a container

Install Docker Compose as a container using a bash script wrapper.

sudo curl -L --fail https://github.com/docker/compose/releases/download/1.29.2/run.sh -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Uninstall Docker Compose

Uninstall Docker Compose installed via pip or pip3.

pip uninstall docker-compose
or
pip3 uninstall docker-compose

Uninstall Docker Compose installed via curl.

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

Conclusion

Installing Docker Compose on arm64 is just as easy as the x86_64 one. At the end of the day, I think it might be more convenient to install and run docker-compose as a container instead as a binary just because we almost treat everything as a microservice in the cloud, or we can simply wait Compose v2 to be stable and ready as a non-beta release.
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.