代码改变世界

docker 安装gitlab

2021-05-09 20:27  qgbo  阅读(60)  评论(0编辑  收藏  举报

1.  docker pull gitlab/gitlab-ce

2. docker run -p 8080:80 -name gitlab gitlab/gitlab-ce

3.以上2步都比较费时间

访问 http://host:8080 打开gitlab

输入root 用户的初始化密码

4. 登录。

新建一个仓库 test

5. 本地的代码,

git  remote add origin http://host:8080/root/test.git

git checkout -b test

git push --set-upstream origin test

可以看到代码已经上传到远程了。