Centos7:Docker安装Gitlab

官方教程
https://docs.gitlab.com/omnibus/docker/

[root@master ~]# docker search gitlab 
INDEX       NAME                                                   DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/gitlab/gitlab-ce                             GitLab Community Edition docker image base...   1784                 [OK]
docker.io   docker.io/sameersbn/gitlab                             Dockerized gitlab web server                    1022                 [OK]
docker.io   docker.io/gitlab/gitlab-runner                         GitLab CI Multi Runner used to fetch and r...   311                  [OK]
docker.io   docker.io/twang2218/gitlab-ce-zh                       汉化的 GitLab 社区版 Docker Image                     99                   [OK]
docker.io   docker.io/gitlab/gitlab-ee                             GitLab Enterprise Edition docker image bas...   89                   
docker.io   docker.io/jangrewe/gitlab-ci-android                   GitLab CI image for building Android apps       36                   [OK]
docker.io   docker.io/centurylink/gitlab                           This image uses the image from sameersbn /...   24                   [OK]
docker.io   docker.io/gitlab/dind                                                                                  21                   [OK]
docker.io   docker.io/cdrx/rancher-gitlab-deploy                   Painless deployment of projects built with...   19                   [OK]
docker.io   docker.io/edbizarro/gitlab-ci-pipeline-php             Build and test PHP applications with Gitla...   9                    
docker.io   docker.io/klud/gitlab-runner                           GitLab Runner for ARM devices                   8                    
docker.io   docker.io/ciricihq/gitlab-sonar-scanner                Gitlab Docker container to run sonar-scann...   5                    [OK]
docker.io   docker.io/gitlab/gitlab-runner-helper                                                                  5                    
docker.io   docker.io/gitlab/cog                                   GitLab Bundle for Cog                           3                    
docker.io   docker.io/dockerphp/gitlab-ci-pipeline                 Gitlab CI pipeline for PHP applications         2                    [OK]
docker.io   docker.io/adamkl/gitlab-merge-request-resource         Customized with support for gitlab ssh on ...   1                    [OK]
docker.io   docker.io/benyoo/gitlab                                基于sameersbn/gitlab:8.9.4和GitLab 中䬮.           1                    [OK]
docker.io   docker.io/gotfix/gitlab                                Dockerized Gitlab with a lot of configurab...   1                    
docker.io   docker.io/mastertinner/gitlab-merge-request-resource   A concourse resource to check for new merg...   1                    [OK]
docker.io   docker.io/primetoninc/gitlab                           gitlab-ce                                       1                    [OK]
docker.io   docker.io/sgillespie/gitlab-runner                     A Dockerized GitLab Runner that automatica...   1                    [OK]
docker.io   docker.io/gitlab/gitlab-qa                             GitLab QA has a test suite that allows end...   0                    
docker.io   docker.io/instrumentisto/gitlab-builder                Docker image with minimal toolchain requir...   0                    [OK]
docker.io   docker.io/sicony/npm-cache-gitlab-mr                   Concourse CI npm cache resource for gitlab...   0                    
docker.io   docker.io/stanfordlegion/gitlab-ci                     An image for Gitlab CI.                         0                    [OK]
[root@master ~]#
[root@master ~]# docker pull docker.io/gitlab/gitlab-ce
Using default tag: latest
Trying to pull repository docker.io/gitlab/gitlab-ce ... 
latest: Pulling from docker.io/gitlab/gitlab-ce
22dc81ace0ea: Pull complete 
1a8b3c87dba3: Pull complete 
91390a1c435a: Pull complete 
07844b14977e: Pull complete 
b78396653dae: Pull complete 
b7b27b5a862c: Pull complete 
b36426107b6c: Pull complete 
3368a63e7ee5: Pull complete 
9af48542e108: Pull complete 
89277d2aced7: Pull complete 
023bfed27041: Pull complete 
Digest: sha256:194d10fcb9421517ce739fb837d8b015bb9154969466e62b0ab057264f063f58
[root@master ~]# 

在服务器上创建目录

[root@master ~]# mkdir -p /docker/gitlab/config
[root@master ~]# mkdir -p /docker/gitlab/logs
[root@master ~]# mkdir -p /docker/gitlab/data
docker run  
   -d \
   -h gitlab \
   -p 2222:22 \
   -p 8888:80 \
   -p 8443:443 \
   -v /docker/gitlab/config:/etc/gitlab \
   -v /docker/gitlab/logs:/var/log/gitlab \
   -v /docker/gitlab/data:/var/opt/gitlab \
   --restart always \
   --name gitlab \
   gitlab/gitlab-ce:latest
[root@master ~]# docker run  -d \
> -h gitlab \
> -p 2222:22 \
> -p 8888:80 \
> -p 8443:443 \
> -v /docker/gitlab/config:/etc/gitlab \
> -v /docker/gitlab/logs:/var/log/gitlab \
> -v /docker/gitlab/data:/var/opt/gitlab \
> --restart always \
> --name gitlab \
> gitlab/gitlab-ce:latest
735b8de9827a615cb69392f542acc33e4fecec998256af62eb9a36e8733cae12
[root@master ~]#

猜你喜欢

转载自blog.csdn.net/chengyuqiang/article/details/80043436