How to install gitlab with docker in ubuntu 24.04

docker volume create --label type=gitlab-17.2 --label env=dev gitlab-17.2-conf
docker volume create --label type=gitlab-17.2 --label env=dev gitlab-17.2-data
docker volume create --label type=gitlab-17.2 --label env=dev gitlab-17.2-logs
sudo docker run --detach \
--hostname gitlab.example.com \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://gitlab.example.com:8929'; gitlab_rails['gitlab_shell_ssh_port'] = 2424" \
--publish 8929:8929 --publish 2424:22 \
--name gitlab-17 \
--restart always \
--volume gitlab-17.2-conf:/etc/gitlab \
--volume gitlab-17.2-data:/var/opt/gitlab \
--volume gitlab-17.2-logs:/var/log/gitlab \
--shm-size 256m \
gitlab/gitlab-ce:17.2.4-ce.0
sudo docker exec -it gitlab-17 /bin/bash
tee -a /etc/gitlab/gitlab.rb <<-'EOF'
external_url "http://gitlab.example.com:8929"
gitlab_rails['gitlab_shell_ssh_port'] = 2424
EOF
gitlab-ctl reconfigure
ylzx@scyl043:~$ docker exec -it gitlab-17 cat /etc/gitlab/initial_root_password
# WARNING: This value is valid only in the following conditions
#          1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
#          2. Password hasn't been changed manually, either via UI or via command line.
#
#          If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

Password: LQj0BIjkK3PD7uxlZT/k/nziqlVNhMsskpOcwiD9/Zk333=

# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.
ylzx@scyl043:~$

http://192.168.110.43:8929/

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qwfys200

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值