zoukankan      html  css  js  c++  java
  • 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。

  • 相关阅读:
    使用envoy在k8s中作grpc的负载均衡
    操作系统中锁的原理(转)
    Linux shell利用sed如何批量更改文件名详解(转)
    Http 连接复用
    记一次Redis错误排查经历(redis cluster 节点重启后无限同步问题)
    nginx重启几种方法(转)
    k8s基础知识-1、基础组件
    Eclipse的预设的Include的路径
    转:音频与采样的计算
    转: wireshark过滤语法总结
  • 原文地址:https://www.cnblogs.com/jiangjingwei/p/8126228.html
Copyright © 2011-2022 走看看