Docker的安装

1.Debian9
step1:卸载老版本docker,如果之前没有安装docker,可以跳过
apt-get remove docker docker-engine docker.io

step2:安装docker需要的相关软件
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common

step3:安装docker官方的GPG证书
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -

step4:添加docker更新源
add-apt-repository deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable

step5:更新软件信息
apt-get update

step6:安装docker
apt-get install docker-ce

step7:下载docker镜像(由于宝塔面板是在centos下研发的,对centos的支持也是最好的,所以我下载的是centos的镜像文件)
docker pull centos

step8:运行镜像
docker run -d --name bt-panel-e -p 21:21 -p 2222:22 -p 80:80 -p 443:443 -p 888:888 -p 3306:3306 -p 8888:8888 -it registry.cn-xxx.xxx.com/bt-panel-e:0.1 /bin/bash

(我这是连接的宝塔集成开发环境)

step9:启动面板服务
docker exec bt-panel-e /etc/init.d/bt start

step10:验证面板是否启动
浏览器地址栏输入:服务器地址:8888
(本机为 127.0.0.1:8888)

2.CentOS安装过程(CentOS7)
step1:配置yum源
CentOS7:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
CentOS6:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

step2:生成缓存
yum makecache

step3:安装docker
yum -y install docker-engine-1.13.1

step4:启动并设为开机自启
systemctl start docker
systemctl enable docker

后续步骤同1。

转载于:https://www.cnblogs.com/jiangjingwei/p/8126228.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值