# docker-compose
### [Install on Linux](https://docs.docker.com/compose/install/#install-compose)
Prerequisite: [[Docker#Install on Ubuntu https docs docker com engine install ubuntu install-using-the-repository|Install Docker engine]]
```bash
# Get release for current architecture from https://github.com/docker/compose/releases, e.g.
RELEASEURL="https://github.com/docker/compose/releases/download/v2.4.0/docker-compose-linux-aarch64"
# Download binary to /usr/local/bin/docker-compose
sudo curl -L $RELEASEURL -o /usr/local/bin/docker-compose
# Apply executable permissions to the binary
sudo chmod +x /usr/local/bin/docker-compose
# Test the install
docker-compose --version
```
## Install on ARM-64
See [docker/compose#6831](https://github.com/docker/compose/issues/6831) for more info.
Install an older version with apt
```bash
sudo apt install docker-compose
```
Alternative 1: Run docker-compose inside a container, does not require installing python on the host system ([more info](https://github.com/docker/compose/issues/6831#issuecomment-683797087))
```bash
sudo curl -L --fail https://raw.githubusercontent.com/linuxserver/docker-docker-compose/master/run.sh -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
```
Alternative 2: Install with pip.
```bash
sudo apt update
sudo apt -y install python3
sudo apt -y install python3-pip
pip3 install docker-compose
```
- Note that you may need to add `/home/<user>/.local/bin` to `PATH` and refresh your shell in order to detect `docker-compose`: `which docker-compose`
- `docker-compose` requires root, yet running with `sudo` reverts back to `sudo: docker-compose: command not found`
Alternative 3: Install from source.