1. 程式人生 > >各種版本docker下載的中國開源地址

各種版本docker下載的中國開源地址

     最近在群裡聽說Docker很火,於是自己抱著試試的態度,想玩玩,可是遇到了一些問題,記錄下來,方便備忘,也方便防止大家被坑。

     我的虛擬機器裝的是centos 6.5,百度了好多教程,丫的,都不解釋,就一句命令:yum install docker-io,這句話是用源安裝docker,可是源一般是國外源,用這個命令因為GFW被牆,根本安裝不了。

[plain] view plain copy print?在CODE上檢視程式碼片派生到我的程式碼片
  1.  [[email protected] ~]# yum install docker-io  
  2. Loaded plugins: fastestmirror, refresh-packagekit, security  
  3. Loading mirror speeds from cached hostfile  
  4.  * base: mirrors.skyshe.cn  
  5.  * extras: mirrors.skyshe.cn  
  6.  * updates: centosx4.centos.org  
  7. Setting up Install Process  
  8. No package docker-io available.  
  9. Error: Nothing to do  
  10. <pre name="code" class="plain">[[email protected] ~]# yum install docker  
  11. Loaded plugins: fastestmirror, refresh-packagekit, security  
  12. Loading mirror speeds from cached hostfile  
  13.  * base: mirrors.163.com  
  14.  * extras: mirrors.skyshe.cn  
  15.  * updates: centosx4.centos.org  
  16. Setting up Install Process  
  17. No package docker available.  
  18. Error: Nothing to do  
save_snippets.png
 [[email protected] ~]# yum install docker-io
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.skyshe.cn
 * extras: mirrors.skyshe.cn
 * updates: centosx4.centos.org
Setting up Install Process
No package docker-io available.
Error: Nothing to do


<pre name="code" class="plain">[
[email protected]
~]# yum install docker Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.skyshe.cn * updates: centosx4.centos.org Setting up Install Process No package docker available. Error: Nothing to do


        總共嘗試了好幾次,所謂的映象很不穩定,不是沒有找到,就是找到了,下了一半就中途斷了,哎,網上總是說一句話搞定,可是一句話搞定要有前提呀,於是乎,我看了開源中國的docker更新記錄

         啥也不說成功了,

[php] view plain copy print?在CODE上檢視程式碼片派生到我的程式碼片
  1. [[email protected] ~]# yum install https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm
  2. Loaded plugins: fastestmirror, refresh-packagekit, security  
  3. Loading mirror speeds from cached hostfile  
  4.  * base: mirrors.163.com  
  5.  * extras: mirrors.skyshe.cn  
  6.  * updates: centosx4.centos.org  
  7. Setting up Install Process  
  8. docker-engine-1.7.1-1.el6.x86_64.rpm                                                                                                 | 4.5 MB     00:07       
  9. Examining /var/tmp/yum-root-YSfgzS/docker-engine-1.7.1-1.el6.x86_64.rpm: docker-engine-1.7.1-1.el6.x86_64  
  10. Marking /var/tmp/yum-root-YSfgzS/docker-engine-1.7.1-1.el6.x86_64.rpm to be installed  
  11. Resolving Dependencies  
  12. --> Running transaction check  
  13. ---> Package docker-engine.x86_64 0:1.7.1-1.el6 will be installed  
  14. --> Processing Dependency: libcgroup for package: docker-engine-1.7.1-1.el6.x86_64  
  15. --> Running transaction check  
  16. ---> Package libcgroup.x86_64 0:0.40.rc1-16.el6 will be installed  
  17. --> Finished Dependency Resolution  
  18. Dependencies Resolved  
  19. ============================================================================================================================================================  
  20.  Package                          Arch                      Version                              Repository                                            Size  
  21. ============================================================================================================================================================  
  22. Installing:  
  23.  docker-engine                    x86_64                    1.7.1-1.el6                          /docker-engine-1.7.1-1.el6.x86_64                     19 M  
  24. Installing for dependencies:  
  25.  libcgroup                        x86_64                    0.40.rc1-16.el6                      base                                                 129 k  
  26. Transaction Summary  
  27. ============================================================================================================================================================  
  28. Install       2 Package(s)  
  29. Total size: 19 M  
  30. Total download size: 129 k  
  31. Installed size: 20 M  
  32. Is this ok [y/N]: y  
  33. Downloading Packages:  
  34. libcgroup-0.40.rc1-16.el6.x86_64.rpm                                                                                                 | 129 kB     00:00       
  35. Running rpm_check_debug  
  36. Running Transaction Test  
  37. Transaction Test Succeeded  
  38. Running Transaction  
  39.   Installing : libcgroup-0.40.rc1-16.el6.x86_64                                                                                                         1/2  
  40.   Installing : docker-engine-1.7.1-1.el6.x86_64                                                                                                         2/2  
  41.   Verifying  : libcgroup-0.40.rc1-16.el6.x86_64                                                                                                         1/2  
  42.   Verifying  : docker-engine-1.7.1-1.el6.x86_64                                                                                                         2/2  
  43. Installed:  
  44.   docker-engine.x86_64 0:1.7.1-1.el6                                                                                                                          
  45. Dependency Installed:  
  46.   libcgroup.x86_64 0:0.40.rc1-16.el6                                                                                                                          
  47. Complete!  
  48. [[email protected] ~]# service docker start  
  49. Starting cgconfig service:                                 [  OK  ]  
  50. Starting docker:                                       [  OK  ]  
save_snippets.png
[[email protected] ~]# yum install https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: mirrors.skyshe.cn
 * updates: centosx4.centos.org
Setting up Install Process
docker-engine-1.7.1-1.el6.x86_64.rpm                                                                                                 | 4.5 MB     00:07     
Examining /var/tmp/yum-root-YSfgzS/docker-engine-1.7.1-1.el6.x86_64.rpm: docker-engine-1.7.1-1.el6.x86_64
Marking /var/tmp/yum-root-YSfgzS/docker-engine-1.7.1-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package docker-engine.x86_64 0:1.7.1-1.el6 will be installed
--> Processing Dependency: libcgroup for package: docker-engine-1.7.1-1.el6.x86_64
--> Running transaction check
---> Package libcgroup.x86_64 0:0.40.rc1-16.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================
 Package                          Arch                      Version                              Repository                                            Size
============================================================================================================================================================
Installing:
 docker-engine                    x86_64                    1.7.1-1.el6                          /docker-engine-1.7.1-1.el6.x86_64                     19 M
Installing for dependencies:
 libcgroup                        x86_64                    0.40.rc1-16.el6                      base                                                 129 k

Transaction Summary
============================================================================================================================================================
Install       2 Package(s)

Total size: 19 M
Total download size: 129 k
Installed size: 20 M
Is this ok [y/N]: y
Downloading Packages:
libcgroup-0.40.rc1-16.el6.x86_64.rpm                                                                                                 | 129 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libcgroup-0.40.rc1-16.el6.x86_64                                                                                                         1/2
  Installing : docker-engine-1.7.1-1.el6.x86_64                                                                                                         2/2
  Verifying  : libcgroup-0.40.rc1-16.el6.x86_64                                                                                                         1/2
  Verifying  : docker-engine-1.7.1-1.el6.x86_64                                                                                                         2/2

Installed:
  docker-engine.x86_64 0:1.7.1-1.el6                                                                                                                        

Dependency Installed:
  libcgroup.x86_64 0:0.40.rc1-16.el6                                                                                                                        

Complete!


[[email protected] ~]# service docker start
Starting cgconfig service:                                 [  OK  ]
Starting docker:                                       [  OK  ]



    下面就開始玩玩docker了,以後慢慢分享

    其他的大家可以看看:http://www.linuxidc.com/Linux/2014-07/104768.htm

                                          https://linux.cn/article-4340-1.html

                                          http://www.centoscn.com/image-text/config/2015/0718/5877.html