mirror of
https://gitee.com/kennylee/docker.git
synced 2024-11-29 18:38:34 +08:00
优化jenkins镜像
This commit is contained in:
parent
8247a3b76d
commit
be515d30c1
@ -1,4 +1,4 @@
|
||||
FROM registry.docker:5000/timekey/python
|
||||
FROM python
|
||||
|
||||
MAINTAINER kennylee26 <kennylee26@gmail.com>
|
||||
|
||||
|
@ -18,7 +18,10 @@ ARG agent_port=50000
|
||||
VOLUME /var/jenkins_home
|
||||
|
||||
USER root
|
||||
RUN sed -i 's/archive.ubuntu.com/mirrors.163.com/g' /etc/apt/sources.list
|
||||
|
||||
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
COPY stretch.sources.list /etc/apt/sources.list
|
||||
|
||||
RUN apt-get -y update
|
||||
# recommend
|
||||
RUN apt-get install -y \
|
||||
|
@ -1,14 +1,15 @@
|
||||
# Jenkins
|
||||
|
||||
由于一些极端情况,不能联网,所以默认情况是使用本地的 `image` ,如果非这样的情况,docker-compose文件可改为 `build .`
|
||||
基于官方 https://hub.docker.com/_/jenkins 镜像构建的mirror,做了本地化的一些提速修改。
|
||||
## 使用
|
||||
|
||||
基础镜像构建命令
|
||||
本地构建命令
|
||||
|
||||
```
|
||||
docker build -t timekey/jenkins:2.19.3 .
|
||||
docker build -t kennylee26/jenkins .
|
||||
```
|
||||
|
||||
默认管理员账号密码 `admin/111111`
|
||||
|
||||
安装其实不是大问题,问题比较大的由于网络问题而导致各种plugin安装不上,最后只能一个一个的下载到本地再进行安装,痛苦。所以如非必要,不建议随便升级,或者除非时间特别充裕吧。
|
||||
>注: jenkins安装插件比较痛苦,因为各种网络问题导致lugin安装不上。这时可以一个一个的下载到本地再进行安装。而一般jenkins升级后,插件也需要升级才能使用,所以不建议随便升级,等时间特别充裕再弄吧。
|
||||
|
||||
|
8
jenkins/stretch.sources.list
Normal file
8
jenkins/stretch.sources.list
Normal file
@ -0,0 +1,8 @@
|
||||
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
|
||||
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
|
||||
deb http://mirrors.aliyun.com/debian-security stretch/updates main
|
||||
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
|
||||
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
|
||||
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
|
||||
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
|
||||
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
|
@ -1,5 +1,5 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName git.timekey.com.cn
|
||||
ServerName git.kennylee.cn
|
||||
DocumentRoot /home/git
|
||||
|
||||
SetEnv GIT_PROJECT_ROOT /home/git
|
||||
|
@ -5,7 +5,7 @@ Docker Registry v2的docker-compose启动文件
|
||||
|
||||
证书命令参考:
|
||||
openssl req -x509 \
|
||||
-subj "/C=CN/ST=BeiJing/L=Dongcheng/CN=docker.timekey.com.cn" \
|
||||
-subj "/C=CN/ST=BeiJing/L=Dongcheng/CN=docker.kennylee.cn" \
|
||||
-nodes -days 3650 -newkey rsa:2048 -keyout server.key -out server.pem
|
||||
|
||||
openssl x509 -outform der -in server.pem -out server.crt
|
||||
|
Loading…
Reference in New Issue
Block a user