Install Docker-compose onto Raspberry OS or Ubuntu

1. Get root rights with sudo:

2. Update your repositories and OS

host:$  sudo -s
Password:
host:#
host:# apt-get update
host:# apt-get upgrade

3. Add Docker repository

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg 

4. Install Docker Engine

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
host:# apt-get update
host:# apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

5. Install Docker Compose

host:# apt-get update
host:# apt-get install docker-compose-plugin
host:# docker compose version
Docker Compose version v2.5.0

Version v2.5.0 is relevant when the article is written.

Run following commands download the current stable release of Docker Compose:

host:# mkdir -p /usr/local/lib/docker/cli-plugins
host:# curl -SL https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-linux-aarch64 -o /usr/local/lib/docker/cli-plugins/docker-compose

This example for Raspberry OS 64bit.
Hence, you have to get relevant release for your platform fromĀ  the Git repository

host:# chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
host:# ln -s /usr/local/lib/docker/cli-plugins/docker-compose /usr/bin/docker-compose
host:#/usr/bin/docker-compose version
 Docker Compose version v2.5.0

Also, the following parameters must be added to first line to enable cgroud for docker compatibility if rasbperry pi is used:

cgroup_enable=memory cgroup_memory=1

vi cat /boot/cmdline.txt

1 thought on “Install Docker-compose onto Raspberry OS or Ubuntu”

Comments are closed.

Scroll to Top
DIY Ideas
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.