Linux安装docker和gitlab-runner

install docker-ce

 yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate  docker-logrotate docker-engine -y

 yum install -y yum-utils device-mapper-persistent-data lvm2

 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

 yum install docker-ce docker-ce-cli  containerd.io -y

增加腾讯云加速器

cat /etc/docker/daemon.json
{
   "registry-mirrors": [
       "https://mirror.ccs.tencentyun.com"
  ]
}
启动docker服务

systemctl start docker

拉起一个容器,测试验证docker

docker run hello-world

install gitlab-runner

wget https://mirrors.cloud.tencent.com/gitlab-runner/yum/el7/gitlab-runner-12.7.1-1.x86_64.rpm

yum install -y gitlab-runner-12.7.1-1.x86_64.rpm

补充:如果是二进制安装gitlan-runner,这需要以下添加:

### creat gitlab-runner user and set docker user-power
useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
groupadd docker    
gpasswd -a gitlab-runner docker 
newgrp docker  
su gitlab-runner 
docker ps   
gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
gitlab-runner start
gitlab-runner向gitlab注册,并install和start gitlab-runner
gitlab-runner register

gitlab-runner install

gitlab-runner start
git push code and check gitlab-cicd jobs
暂无评论

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇