使用docker中gitlab的tip

本文详细介绍了如何使用Docker导出和导入GitLab镜像,以及通过docker-compose实现GitLab的安装和配置,包括设置外部URL、端口映射和数据卷。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

docker:
安装说明:
https://docs.gitlab.com/omnibus/docker/README.html

1.导出gitlab的镜像
 docker save -o gitlab_image.tar gitlab/gitlab-ce

F:\docker\images\gitlab_image.tar

2.导入:

docker import test.img test


3.Install GitLab using Docker Compose
Create a docker-compose.yml file (or download an example):

web:
  image: 'gitlab/gitlab-ce:latest'
  restart: always
  hostname: 'gitlab.example.com'
  environment:
    GITLAB_OMNIBUS_CONFIG: |
      external_url 'https://gitlab.example.com'
      # Add any other gitlab.rb configuration here, each on its own line
  ports:
    - '80:80'
    - '443:443'
    - '22:22'
  volumes:
    - '$GITLAB_HOME/gitlab/config:/etc/gitlab'
    - '$GITLAB_HOME/gitlab/logs:/var/log/gitlab'
    - '$GITLAB_HOME/gitlab/data:/var/opt/gitlab'

4.启动:
docker-compose up -d

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值