#下载 docker pull mysql #启动mysql容器,返回容器id (-p 3306:3306 指定外部连接端口,不指定外部连接不上) docker run --name gitlab-mysql -e MYSQL_ROOT_PASSWORD=Mimais163. -d mysql #连接进入mysql命令行 docker run -it --link gitlab-mysql:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"' #MySQL命令 show databases; #显示数据库 quit #退出命令行
#进入设置 Running in system-mode. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): #Specify the following URL during the Runner setup:http://exxk.me:10080/ > http://exxk.me:10080/ Please enter the gitlab-ci token for this runner: #Use the following registration token during setup:qg78V4rsaxabgULs-cps > qg78V4rsaxabgULs-cps Please enter the gitlab-ci description for this runner: > [dd8f66b4b9ac]: aa Please enter the gitlab-ci tags for this runner (comma separated): > cc Whether to run untagged builds [true/false]: > [false]: Whether to lock Runner to current project [true/false]: > [false]: Registering runner... succeeded runner=qg78V4rs Please enter the executor: docker, parallels, shell, docker+machine, kubernetes, docker-ssh, ssh, virtualbox, docker-ssh+machine: # 选择runner 运行的环境 这里是docker > docker Please enter the default Docker image (e.g. ruby:2.1): > tomcat Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!