liguangxin
liguangxin:~/blog$ source "linux(centos7) 安装 docker.sh"

liguangxin:~/blog$ printenv
CREATED_DATE = 2024-08-27
UPDATED_DATE = 2024-08-27
TAGS = docker : docker-compose : linux
CATEGORIES = Docker : Linux

liguangxin:~/blog$ grep -lr $TAGS post
2024-08-27 linux(centos7) 安装 docker
2024-08-27 docker-compose 环境变量
linux(centos7) 安装 docker
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

yum -y install wget

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

yum install -y yum-utils device-mapper-persistent-data lvm2

yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum -y install docker-ce