docker-gitlab

作者: RGW | 来源:发表于2017-08-10 12:59 被阅读41次

gitlab-ce

GitLab Community Edition docker image based on the Omnibus package
https://hub.docker.com/r/gitlab/gitlab-ce/

pull 之前最好修改为国内镜像, 推荐阿里云的HUB镜像。参考《docker安装》中如何添加镜像。

docker pull gitlab/gitlab-ce

Run the image:

sudo docker run --detach \
    --hostname gitlab.example.com \
    --publish 443:443 --publish 80:80 --publish 22:22 \
    --name gitlab \
    --restart always \
    --volume /srv/gitlab/config:/etc/gitlab \
    --volume /srv/gitlab/logs:/var/log/gitlab \
    --volume /srv/gitlab/data:/var/opt/gitlab \
    gitlab/gitlab-ce:latest

https://docs.gitlab.com/omnibus/docker/

sudo docker run --detach \
    --hostname 192.168.30.40 \
    --publish 4431:443 --publish 801:80 --publish 221:22 \
    --name gitlab \
    --restart always \
    --volume /srv/gitlab/config:/etc/gitlab \
    --volume /srv/gitlab/logs:/var/log/gitlab \
    --volume /srv/gitlab/data:/var/opt/gitlab \
    gitlab/gitlab-ce:latest

docker ps -a
docker stop id
docker rm id
docker rm -f id == docker stop id & docker rm id

相关文章

网友评论

    本文标题:docker-gitlab

    本文链接:https://www.haomeiwen.com/subject/csxhrxtx.html