docker配置Runner容器的方法
1.创建runner容器
mk@mk-pc:~/桌面$ docker run -di --name my-runner --net my-gitlab-net gitlab/gitlab-runner:latestaddc6e08521a6f707494c7a05e63670331c76baaf261282bdd17e2e24268583b
2.配置runner和gitlab做一个关联
root@addc6e08521a:/# gitlab-runner registerRuntime platformarch=amd64 os=linux pid=262 revision=4b9e985a version=14.4.0Running in system-mode.Enter the GitLab instance URL (for example, https://gitlab.com/):http://192.168.88.2/Enter the registration token:mqL7CpxduBkV55pEwo7AEnter a description for the runner:[addc6e08521a]: my first runnerEnter tags for the runner (comma-separated):dockercicdRegistering runner... succeededrunner=mqL7CpxdEnter an executor: docker, parallels, ssh, custom, shell, virtualbox, docker+machine, docker-ssh+machine, kubernetes, docker-ssh:dockerEnter the default Docker image (for example, ruby:2.6):appRunner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! root@addc6e08521a:/#
文章图片
3.编写流水线文件
.gitlab-ci.yml
stages:- build- deploybuild:stage: buildtags:- buildonly:- devscript:- echo "mvn clean"- echo "mvn install"deploy:stage: deploytags:- deployonly:- devscript:- echo "java -jardxxx"
运行流水线
文章图片
【docker配置Runner容器的方法】到此这篇关于docker配置Runner的文章就介绍到这了,更多相关docker配置Runner内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
推荐阅读
- Docker应用:容器间通信与Mariadb数据库主从复制
- vue-cli|vue-cli 3.x vue.config.js 配置
- gitlab|gitlab 通过备份还原 admin/runner 500 Internal Server Error
- 从战略性的角度可以配置股票
- 缓存有关的配置和属性
- Spring|Spring Boot 自动配置的原理、核心注解以及利用自动配置实现了自定义 Starter 组件
- docker镜像探索----dive工具
- Vagrant|Vagrant (三) - 网络配置
- java|java b2b2c shop 多用户商城系统源码- config 修改配置
- CentOS7 阿里云镜像配置方法