By default on the new Enterprise Linux distributions, docker engine has been replaced by podman, a docker compliant engine. In order to install docker
and docker-compose
, you can follow this simple tutorial.
Install Docker Engine
To install docker engine we’ll add first the docker repository:
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Code language: JavaScript (javascript)
And now we can proceed to install docker:
sudo dnf install -y docker-ce docker-ce-cli containerd.io
Code language: CSS (css)
And we can start docker with systemctl
sudo systemctl start docker
Install docker-compose
First let’s download docker-compose
to /usr/local/bin
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Code language: JavaScript (javascript)
And make it executable
chmod +x /usr/local/bin/docker-compose
Finally, let’s add a link to docker-compose
to /usr/bin
(this step is not needed if you have /usr/local/bin
in your PATH).
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Et voilá, everything is set. You can check if docker-compose
is working by running docker-compose --version
2 responses
Do not use specific versions, use latest.
sudo curl -L “https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose
Hi Deses, you are right. I’ve edited the post to reflect your suggestion.