Docker安装过程

1.安装docker: yum -y install docker-io

2.启动并设置开机自动启动:   service docker start    chkconfig docker on

3. 拉取镜像    docker pull centos:latest

拉取中需要使用daoclound加速:curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://261a72f8.m.daocloud.io

4.启动镜像 docker run --name=''(自定义名称)+ 镜像名 + 启动参数 例如: docker run --name=test01  -i -t centos /bin/bash

5.退出命令 exit 或者 Ctrl+P+Q(后台运行)

6.重新回到容器 docker attach + 容器名称 例如 docker attach test01


安装过程中可能存在的问题:

问题描述:安装完成后,service docker start不能正常启动 此时通过systemctl status docker.service 查看问题 Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel

解决办法:

重新编辑docker配置文件:
vi /etc/sysconfig/docker

# /etc/sysconfig/docker

# Modify these options if you want to change the way the docker daemon runs

OPTIONS='--selinux-enabled=false  --log-driver=journald --signature-verification=false'
if [ -z "${DOCKER_CERT_PATH}" ]; then
    DOCKER_CERT_PATH=/etc/docker
fi







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值