安装Docker CE
// 1. 安装必要的一些系统工具
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
// 2. 添加软件源信息
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#[zhouhh@mainServer ~]$ sudo yum-config-manager --enable docker-ce-edge
// 3. 更新并安装 Docker-CE
#yum makecache fast
sudo yum -y install docker-ce
// 4. 开启Docker服务
sudo systemctl start docker service docker start
// 5检查安装完成否
docker version
普通用户启动docker 不用前面加sudo方法
sudo groupadd docker
sudo gpasswd -a vagrant docker
重启docker sudo service docker restart
退出 重新vagrant进入
CentOS 7
修改CentOS默认yum源为阿里yum镜像源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
之后运行yum makecache生成缓存
docker 加速器
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://abb9fc83.m.daocloud.io
CentOS7版本后防火墙 设置
//临时关闭
systemctl stop firewalld
//禁止开机启动
systemctl disable firewalld
下面也可以
关闭SELinux服务
setenforce 0
关闭防火墙
iptables -F
设置开机启动
systemctl enable docker
然后
shutdown -r now 重新启动
systemctl status docker 查看是否启动状态
方式一:通过代码删除
命令:$ git push origin 【空格】【冒号】【需要删除的分支名字】
比如我github上有master和feature分支,我现在想着删除feature分支,命令如下:
$ git push origin :feature