安装docker

  • 安装 virtualbox
  • 下载 dockertoolbox并安装

官网的服务器一直连不上, 幸亏还有这个 https://get.daocloud.io/toolbox/http://mirrors.aliyun.com/docker-toolbox/ 更新及时点

用docker安装gitlab

配置ip

192.168.99.100 是virtualbox生成的局域网ip地址,为了让其他机器可以访问到它, 需要进一步配置。
思路是将192.168.99.100 转发给服务器的ip, 如下图:
利用docker安装gitlab

附运行日志

keke.zhaokk@ALI-35926N MINGW64 /d/Private/Desktop 
$ docker-machine create --engine-registry-mirror=https://****.mirror.aliyuncs.com -d virtualbox default    
$ docker-machine env default                  
$ eval "$(docker-machine env default)"  
$ docker info                                                                                             

显示正常

keke.zhaokk@ALI-35926N MINGW64 /d/Private/Desktop                                                
$ docker pull sameersbn/gitlab:8.7.0                                                             
8.7.0: Pulling from sameersbn/gitlab                                                             
                                                                                                 
759d6771041e: Pull complete ================================================>] 65.69 MB/65.69 MBB
8836b825667b: Pull complete ================================================>] 71.48 kB/71.48 kBB
c2f5e51744e6: Pull complete ================================================>]    681 B/681 BB   
a3ed95caeb02: Pull complete ================================================>]     32 B/32 BB    
4317b5b0c2e1: Pull complete ================================================>] 2.586 MB/2.586 MBB
f8f5ef388ea3: Pull complete ================================================>]  69.5 MB/69.5 MBB 
0e1260feafd2: Pull complete ================================================>] 3.258 kB/3.258 kBB
77753f6f394c: Pull complete ================================================>] 149.7 MB/149.7 MBB
dc9d44c8b12c: Pull complete ================================================>] 26.33 kB/26.33 kBB
a73c17bdc7e2: Pull complete ================================================>]    654 B/654 BB   
7db74b8c9d88: Pull complete ================================================>]    653 B/653 BB   
Digest: sha256:36b56b6a9821bfa752d9ecd6f9d59b6e2ed4d5430efa0acd2133985ba7ff3224                  
Status: Downloaded newer image for sameersbn/gitlab:8.7.0                                        
                                                                                                 
                                                                                                 
keke.zhaokk@ALI-35926N MINGW64 /d/Private/Desktop                                                
$ curl  -O https://raw.githubusercontent.com/sameersbn/docker-gitlab/master/docker-compose.yml   
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                  
                                 Dload  Upload   Total   Spent    Left  Speed                    
100  1554  100  1554    0     0    384      0  0:00:04  0:00:04 --:--:--   585                   
                                                                                                 
keke.zhaokk@ALI-35926N MINGW64 /d/Private/Desktop                                                
$ docker-compose up                                                                              
Pulling redis (sameersbn/redis:latest)...                                                        
latest: Pulling from sameersbn/redis                                                             
759d6771041e: Already exists                                                                     
8836b825667b: Already exists                                                                     
c2f5e51744e6: Already exists                                                                     
a3ed95caeb02: Already exists                                                                     
4317b5b0c2e1: Already exists                                                                     
cedb06c1c707: Pull complete=================================================>] 740.6 kB/740.6 kBB
e8374055db84: Pull complete=================================================>]    696 B/696 BB   
ad68fa18a2ba: Pull complete=================================================>]    699 B/699 BB   
Digest: sha256:653fbcbe1f9006e7dc7282d124f90a493ba2c8fafae31d5d6c5b344d21e99d77                  
Status: Downloaded newer image for sameersbn/redis:latest                                        
Pulling postgresql (sameersbn/postgresql:9.4-20)...                                              
9.4-20: Pulling from sameersbn/postgresql                                                        
759d6771041e: Already exists                                                                     
8836b825667b: Already exists                                                                     
c2f5e51744e6: Already exists                                                                     
a3ed95caeb02: Already exists                                                                     
4317b5b0c2e1: Already exists                                                                     
3fbfecf1335a: Pull complete=================================================>] 13.62 MB/13.62 MBB
e4a651876d33: Pull complete=================================================>] 4.332 kB/4.332 kBB
8bd3de79a26d: Pull complete=================================================>]    538 B/538 BB   
cf176e09c435: Pull complete=================================================>]    535 B/535 BB   
e66bc8397b35: Pull complete=================================================>]    134 B/134 BB   
Digest: sha256:95feaaa1f225805c1f08a08293401b4bcc6d4ca4b4d67cead1f0054af8346f3e         
Status: Downloaded newer image for sameersbn/postgresql:9.4-20                          
Creating desktop_postgresql_1                                                           
Creating desktop_redis_1                                                                
Creating desktop_gitlab_1                                                               
Attaching to desktop_postgresql_1, desktop_redis_1, desktop_gitlab_1                    
postgresql_1  | Initializing datadir...                                                 
postgresql_1  | Initializing certdir...                                                 
postgresql_1  | Initializing logdir...                                                  
postgresql_1  | Initializing rundir...                                                  
postgresql_1  | Setting resolv.conf ACLs...                                             
postgresql_1  | Initializing database...                                                
redis_1       | Starting redis-server...                                                
redis_1       |                 _._                                                     
redis_1       |            _.-``__ ''-._                                                
redis_1       |       _.-``    `.  `_.  ''-._           Redis 2.8.4 (00000000/0) 64 bit 
redis_1       |   .-`` .-```.  ```\/    _.,_ ''-._                                      
redis_1       |  (    '      ,       .-`  | `,    )     Running in stand alone mode     
redis_1       |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379                      
redis_1       |  |    `-._   `._    /     _.-'    |     PID: 1                          
redis_1       |   `-._    `-._  `-./  _.-'    _.-'                                      
redis_1       |  |`-._`-._    `-.__.-'    _.-'_.-'|                                     
redis_1       |  |    `-._`-._        _.-'_.-'    |           http://redis.io           
redis_1       |   `-._    `-._`-.__.-'_.-'    _.-'                                      
redis_1       |  |`-._`-._    `-.__.-'    _.-'_.-'|                                     
redis_1       |  |    `-._`-._        _.-'_.-'    |                                     
redis_1       |   `-._    `-._`-.__.-'_.-'    _.-'                                      
redis_1       |       `-._    `-.__.-'    _.-'                                          
redis_1       |           `-._        _.-'                                              
redis_1       |               `-.__.-'                                                  
redis_1       |                                                                         
redis_1       | [1] 03 May 02:56:44.697 # Server started, Redis version 2.8.4   

...