1、安装docker
可参考:https://www.jianshu.com/p/270020e5b313
2、自定义 docker 的默认运行目录和镜像仓库地址(可跳过)
docker镜像地址选用阿里云
image.png
vim /etc/docker/daemon.json
添加
{ "graph":"/opt/docker", "registry-mirrors": ["https://xxxxxx.mirror.aliyuncs.com"]
}重启
systemctl restart docker
查看
docker info
image.png
3、下载docker镜像
docker pull gitlab/gitlab-ce:latest
4、开放阿里云安全组端口、配置防火墙(8443、880、822)
docker run -d \ --publish 8443:443 --publish 880:80 --publish 822:22 \ --name gitlab \ --volume /opt/gitlab/config:/etc/gitlab \ --volume /opt/gitlab/logs:/var/log/gitlab \ --volume /opt/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce
5、登陆gitlab
http://ip:880/users/sign_in(需要等待几分钟,待gitlab启动完成)
6、注意点
http:
将 http://954a3593a13b/hsshy/guns-parent.git 中的954a3593a13b改为你的ip加端口git clone http://ip:880/hsshy/guns-parent.git
ssh:
到.ssh目录下生成公钥私钥
ssh-keygen -t rsa -C "[email protected]" -b 4096
将id_rsa.pub的内容复制到
image.png
image.png
image.png
将 git@954a3593a13b:hsshy/guns-parent.git 中的 954a3593a13b:hsshy 改成 ip:822/hsshy git clone ssh://git@ip:822/hsshy/guns-parent.git
作者:yellow_han
链接:https://www.jianshu.com/p/28e0c4c3be4e
點擊查看更多內容
為 TA 點贊
評論
評論
共同學習,寫下你的評論
評論加載中...
作者其他優質文章
正在加載中
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦




