docker安装gitlab

export GITLAB_HOME=/srv/gitlab

sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 2222:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
--shm-size 256m \
registry.gitlab.cn/omnibus/gitlab-jh:latest

sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
#root
#oChaZOA3WzUzp7slJ/hEBhkk+Jmthzkm/hB3uRNp6E4=
# c:\windows\system32\drivers\etc\host
#10.0.0.17 gitlab.example.com

#http://gitlab.example.com

#yum install git -y

posted @ 2022-10-14 21:41  joechenyao  阅读(199)  评论(0)    收藏  举报