Install Docker

Install Docker Automatically

Posted by boydfd on 2017-05-15 17:00:01 +0800

Recently by the same author:


大语言模型中一个调皮的EOS token

You may find interesting:


GoCD with Docker

Quick Setup GoCD with Docker

Situation

I have installed docker for many times, every time I want to install docker, I have to

  1. search ‘install docker’ at google
  2. open docker document site
  3. copy and execute installation command one by one.

ops!!! I’m fed up with it.

So here comes my automatic script.

Script

this script do everything for you to installing docker.

export user=$USER;curl https://raw.githubusercontent.com/boydfd/inertia/master/docker/install_docker.sh | sudo -E bash

detail

1.installation

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo yum install -y docker-ce
sudo systemctl start docker

2.post-installation (add current user to docker group so that you can execute docker command without sudo)

sudo groupadd docker 
sudo usermod -aG docker $USER

3.start docker on boot

sudo systemctl enable docker

4.set all above

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo yum install -y docker-ce
sudo systemctl start docker
sudo groupadd docker 
sudo usermod -aG docker $USER
sudo systemctl enable docker

more script?

visit this site: inertia script