安装jenkins
#下载镜像 docker pull jenkins/jenkins #创建文件夹 mkdir -p /home/jenkins_home #权限 chmod 777 /home/jenkins_home #启动 docker run -d -uroot -p 9095:8080 -p 50000:50000 --name jenkins -v /home/jenkins_home:/var/jenkins_home -v /etc/localtime:/etc/localtime jenkins/jenkins #日志查看密码 docker logs jenkins
安装gitlab
docker pull gitlab/gitlab-ce:latest mkdir -p /home/gitlab/etc mkdir -p /home/gitlab/log mkdir -p /home/gitlab/opt # 启动容器 docker run \ -itd \ -p 9980:80 \ -p 9922:22 \ -v /home/gitlab/etc:/etc/gitlab \ -v /home/gitlab/log:/var/log/gitlab \ -v /home/gitlab/opt:/var/opt/gitlab \ --restart always \ --privileged=true \ --name gitlab \ gitlab/gitlab-ce
cd /home/gitlab/etc #进入配置文件所在目录下 cp gitlab.rb gitlab.rb.bak #修改配置文件之前先备份 vim gitlab.rb #下列显示的都是编辑器中内容 # external_url 'GENERATED_EXTERNAL_URL' #找到这一行,修改为下面这一行 external_url 'http://192.168.119.101' #后面的地址改为gitlab地址 # gitlab_rails['gitlab_shell_ssh_port'] = 22 #找到这一行,修改为下面一行 gitlab_rails['gitlab_shell_ssh_port'] = 2222 #开启gitlab的ssh功能并且端口改为2222; :wq #保存且推出vim编辑器 docker restart gitlab #重启gitlab容器生效
标签:--,gitlab,etc,home,jenkins,docker From: https://www.cnblogs.com/goPush/p/18102230