Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installing Docker and Docker Compose

Fedora Linux

sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker

Add a user to docker group:

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

macOS

Install Docker

brew install docker
brew install colima
brew services start colima

Restart.

Check the installed Docker version:

docker --version

Output:

Docker version 29.1.2, build 890dcca

The login credentials are stored in:

/Users/user_name/.docker/config.json

It is not a safe way to sore credentials, anyway, after modifying this file run:

colima restart

Install Docker Compose

brew install docker-compose

Update .docker/config.json file, add the following entry:

  "cliPluginsExtraDirs": [
    "/opt/homebrew/lib/docker/cli-plugins"
  ]
colima restart

Check the installed version:

docker-compose version

Output:

Docker Compose version 5.0.0

References