Docker is an open source application deployment framework. It enables you to deploy applications in their own self-contained environments, providing portability and ease of distribution.
The following procedure describes how to install Docker on AlmaLinux.
The following procedure describes how to install Docker on a managed Dedicated Server with root access running AlmaLinux.
To install Docker on AlmaLinux, follow these steps:
yum -y update reboot
To add the EPEL (Extra Packages for Enterprise Linux) repository, type the following command:
yum -y install epel-release
To verify that the EPEL repository has been added, type the following command:
yum repolist
You should see in the repository list output a line that resembles the following:
epel Extra Packages for Enterprise Linux 6 - x86_64
To install Docker, type the following command:
yum -y install docker-io
To start the Docker service, type the following command:
service docker start
If you want the Docker service to start automatically every time the system starts, type the following command:
chkconfig docker on
To verify that Docker installed correctly, type the following command:
docker run fedora /bin/echo hello world
Because this is the first time you are running the Fedora container image, Docker downloads it first, and then runs the command. You should see the following output:
hello world
You can also run an interactive shell within the container. To do this, type the following command:
docker run -i -t fedora /bin/bash
Note that the command prompt changes to show that you are running an interactive shell in the container. To exit the interactive shell and return to the normal prompt, type exit.
For more information about Docker, please visit http://docker.io.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.