Skip to content

Instantly share code, notes, and snippets.

@novohool
Last active May 21, 2018 14:01
Show Gist options
  • Save novohool/9265ea89286619d1a1a84b3237f195f7 to your computer and use it in GitHub Desktop.
Save novohool/9265ea89286619d1a1a84b3237f195f7 to your computer and use it in GitHub Desktop.
私有代码仓库应用部署
迅雷下载
```
https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/6/gitlab-ce-10.7.3-ce.0.el6.x86_64.rpm/download.rpm
```
安装
```
vi /etc/gitlab/gitlab.rb
配置 external_url "http://gitlab.example.com"
初始化 gitlab-ctl reconfigure
启动 gitlab-ctl start
默认用户名密码
root 5iveL!fe
```
**登陆到相应的80端口创建仓库**
使用
```
登录
docker login registry.gitlab.com
账号密码
jingslunt
me
创建仓库
git clone https://gitlab.com/jingslunt/test.git
cd test
创建docker
docker build -t test .
其中
当前目录下的 Dockerfile
FROM scratch
ADD README.md /
当前目录下的 .dockerignore
ingstall.sh
查看是否创建成功
docker images
推送
docker tag test:latest registry.gitlab.com/jingslunt/test
docker push registry.gitlab.com/jingslunt/test
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment