By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
IT Infras HolicIT Infras HolicIT Infras Holic
  • News
  • Linux
    • Application
    • SELinux
    • Centos
    • Ubuntu
  • Docker
  • Web Server
    • Kong
    • Nginx
    • Openlitespeed
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
    • 2048
    • Fantasy Forest
    • Hextris
    • Crossword
Search
  • Privacy Policy
© 2024. All Rights Reserved.
Font ResizerAa
IT Infras HolicIT Infras Holic
Font ResizerAa
  • News
  • Linux
  • Docker
  • Web Server
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
Search
  • News
  • Linux
    • Application
    • SELinux
    • Centos
    • Ubuntu
  • Docker
  • Web Server
    • Kong
    • Nginx
    • Openlitespeed
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
    • 2048
    • Fantasy Forest
    • Hextris
    • Crossword
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
IT Infras Holic > Blog > Linux > Centos > Install Docker CE on CentOS 7
CentosDocker

Install Docker CE on CentOS 7

writer
Share
2 Min Read
SHARE

Install Docker CE on CentOS 7

What is Docker?

Docker is an open source platform that enables developers to build, deploy, run, update and manage containers—standardized, executable components that combine application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.. As written here, Docker Community Edition (CE) is ideal for developers and small teams looking to get started with Docker and experimenting with container-based apps. Docker CE has two update channels, stable and edge:

Contents
Install Docker CE on CentOS 7What is Docker?Make docker.sh fileInsert  this script into docker.shDocker-Compose ScriptRun the script
  1. Stable gives you reliable updates every quarter.
  2. Edge gives you new features every month.

If you want to install docker ce on CentOS 7, please use bash script below for easy installation

Make docker.sh file

1
vi docker.sh

 

Insert  this script into docker.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Remove any old versions
sudo yum remove docker docker-common docker-selinux docker-engine
 
# Install required packages
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
 
# Configure docker repository
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
 
# Install Docker-ce
sudo yum install docker-ce -y
 
# Start Docker
sudo systemctl start docker
sudo systemctl enable docker
 
# Post Installation Steps
# Create Docker group
sudo groupadd docker
 
# Add user to the docker group
sudo usermod -aG docker $USER
 
echo "Installation Complete -- Logout and Log back"

If you want to install docker-compose, add this script

Docker-Compose Script

1
2
3
4
5
6
7
8
9
10
11
12
13
# Install docker-compose (check latest version https://github.com/docker/compose/releases)
curl -L "https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
 
# Permssion +x execute binary
chmod +x /usr/local/bin/docker-compose
 
# Create link symbolic
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo chmod 755 /usr/local/bin/docker-compose
 
# Check Version docer-compose
echo "Installation Complete -- Logout and Log back"
docker-compose --version

 

Run the script

1
sudo sh docker.sh

 

and..whallaaa..You have successfully install docker ce on CentOS 7 including docker compose

You Might Also Like

Install RabbitMQ on CentOS 7

How to Clear Docker Logs and Activate Log Rotate

Install Kong Konga using Docker Compose

How to Change Docker Timezone

How to Enable Docker Remote API

TAGGED: docker, docker compose, docker install
Share This Article
Facebook Twitter Whatsapp Whatsapp LinkedIn Telegram Copy Link
Previous Article Enable DNS over HTTPS on Mikrotik Enable DNS over HTTPS on Mikrotik (DoH on Mikrotik)
Next Article How to Enable Docker Remote API How to Enable Docker Remote API
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest News

bash
Monitoring File & Directory Changes using Bash Script
Linux Application
vulnerability
Vulnerability Checker CVE-2024-3094
Linux
wiki.js
Unleashing the Potential of Knowledge Management with Wiki.js
Application Linux
Install Apache Guacamole
How to Install Apache Guacamole with Docker Compose
Application Linux

You Might also Like

add delete route in linux
CentosLinux

Add Delete Route in Linux CentOS 7

4 Min Read
add swap on centos 7
CentosLinux

How to Add Swap on CentOS 7

2 Min Read
Follow US
© 2024
activity notes activity notes
Welcome Back!

Sign in to your account

Lost your password?