To install Docker CE and Docker Compose on CentOS Stream release 8 and start the Docker service, follow these steps:
1. Update Packages:
Ensure your system is up-to-date by running the following command:
# sudo dnf update
2. Install Docker CE:
Install Docker Community Edition (CE) using the following commands:
# sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
# sudo dnf install docker-ce
3. Install Docker Compose:
Install Docker Compose using the following commands:
# sudo dnf install -y curl
# sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# sudo chmod +x /usr/local/bin/docker-compose
4. Start Docker Service:
Start and enable the Docker service:
# sudo systemctl start docker
# sudo systemctl enable docker
5. Verify Installation:
Check the Docker version to confirm the installation:
# docker --version
Check the Docker Compose version:
# docker-compose --version
Your Server should now have Docker CE and Docker Compose installed and the Docker service running.
No comments:
Post a Comment