【Docker】openEuler 使用docker-compose部署gitlab-ce

docker-compose配置

复制代码
services:
  gitlab:
    image: gitlab/gitlab-ce:latest
    container_name: gitlab
    restart: always
    hostname: 'gitlab.example.com'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        # Add any other gitlab.rb configuration here, each on its own line
        external_url 'https://gitlab.example.com'
    ports:
      - '8082:80'
      - '8443:443'
      - '2022:22'
    volumes:
      - '/data/gitlab/config:/etc/gitlab'
      - '/data/gitlab/logs:/var/log/gitlab'
      - '/data/gitlab/data:/var/opt/gitlab'
    shm_size: '256m'

启动容器

复制代码
docker-compose up -d

查看容器

复制代码
# docker ps | grep gitlab
eaafea69b738   gitlab/gitlab-ce:latest                      "/assets/init-contai..."   8 minutes ago   Up 5 minutes (healthy)   0.0.0.0:2022->22/tcp, :::2022->22/tcp, 0.0.0.0:8082->80/tcp, :::8082->80/tcp, 0.0.0.0:8443->443/tcp, :::8443->443/tcp   gitlab

查看初始密码

复制代码
cat config/initial_root_password

默认用户名:root

防火墙开放8443

复制代码
firewall-cmd --add-port 8443/tcp
firewall-cmd --add-port 8443/tcp --permanent

参考

Install GitLab in a Docker container | GitLab Docs

gitlab/gitlab-ce 镜像下载与镜像部署手册 | 轩辕镜像

相关推荐
百年੭ ᐕ)੭*⁾⁾33 分钟前
docker使用neo4j
docker·容器·neo4j
春风有信2 小时前
【2026.05.01】Windows10安装Docker Desktop 4.71.0.0步骤及问题解决
运维·docker·容器
lisanmengmeng6 小时前
Gitlab搭建
gitlab
sthnyph7 小时前
docker compose安装redis
redis·docker·容器
W.A委员会7 小时前
Docker基本使用流程
运维·docker·容器
gwjcloud9 小时前
Kubernetes从入门到精通(进阶篇)03
云原生·容器·kubernetes
GuokLiu9 小时前
260502-Clawith-Docker安装过程
运维·docker·容器·claw
JesseDev10 小时前
Docker lnmp环境快速搭建开箱即用
运维·docker·容器
空中海11 小时前
Docker入门到精通
java·docker·eureka
小义_11 小时前
【Kubernetes】(十二)配置存储卷
云原生·容器·kubernetes