当前位置: 游戏平台 > 互联网科技 > 正文

Docker使用教程

时间:2019-11-05 23:44来源:互联网科技
CentOS修改源为163和指定epel源和Docker安装 当我们把CentOS6.5安装好以后,可以使用这个脚本来使用国内的阿里云镜像源 地址: #!/bin/bash mv /etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.

CentOS 修改源为163和指定epel源和Docker安装

当我们把CentOS 6.5安装好以后,可以使用这个脚本来使用国内的阿里云镜像源

地址:

#!/bin/bash
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
wget -O /etc/yum.repos.d/epel.repo
yum makecache

使用说明

有了国内的源地址,后面安装东西就方便了。
搜索docker,可以看到docker-io.x86_64和docker-registry.noarch,安装docker就简单了。

首先备份/etc/yum.repos.d/CentOS-Base.repo

[root@localhost ~]# yum search docker
 Loaded plugins: fastestmirror
 Loading mirror speeds from cached hostfile
 ======================================================== N/S Matched: docker =========================================================
 python-docker-py.x86_64 : An API client for docker written in Python
 docker-io.x86_64 : Automates deployment of containerized applications
 docker-registry.noarch : Registry server for Docker
 Fedora-dockerfiles.noarch : Example dockerfiles to assist standing up containers quickly
 imagefactory-plugins-Docker.noarch : Cloud plugin for Docker
 docker.x86_64 : KDE and GNOME2 system tray replacement docking application

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

  Name and summary matches only, use "search all" for everything.

下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)

 

CentOS5

CentOS 6/7系列安装Docker http://www.linuxidc.com/Linux/2014-07/104768.htm 

CentOS6

Docker的搭建Gitlab CI 全过程详解 http://www.linuxidc.com/Linux/2013-12/93537.htm 

运行yum makecache生成缓存

Docker安装应用(CentOS 6.5_x64) http://www.linuxidc.com/Linux/2014-07/104595.htm 

eple源:

Docker 和一个正常的虚拟机有何区别? http://www.linuxidc.com/Linux/2013-12/93740.htm 

rpm -Uvh

在 Docker 中使用 MySQL http://www.linuxidc.com/Linux/2014-01/95354.htm 

docker 安装:

Docker 将改变所有事情 http://www.linuxidc.com/Linux/2013-12/93998.htm 

You will need RHEL 6.5 or higher, with a RHEL 6 kernel version 2.6.32-431 or higher as this has specific kernel fixes to allow Docker to work.

Docker安装应用(CentOS 6.5_x64) http://www.linuxidc.com/Linux/2014-07/104595.htm 

CentOS 6.5已经是2.6.32-431内核了,所以最好安装这个版本。

更多详情见请继续阅读下一页的精彩内容: http://www.linuxidc.com/Linux/2014-09/106675p2.htm

yum -y install docker-io

图片 1

升级: yum -y update docker-io

手动升级:

wget -O docker

编辑:互联网科技 本文来源:Docker使用教程

关键词: