-
Notifications
You must be signed in to change notification settings - Fork 0
Jenkins_CI
李志强 edited this page Jul 12, 2017
·
6 revisions
- Jenkins直接安装在裸机上,因为docker in docker安装目前还有一些问题没有解决,访问url:47.90.1.144:8080, 用户名:keepwork, 密码:keepwork.
- 新建npl-runtime项目,git代码url为https://github.com/LiXizhi/NPLRuntime
- Dockerfile
FROM ubuntu:16.04
MAINTAINER xuntian "li.zq@foxmail.com"
RUN apt-get -y update && apt-get -y install git wget build-essential cmake libcurl4-openssl-dev \
libssl-dev libssh2-1-dev libbz2-dev freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev \
libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
ADD ./ /opt/NPLRuntime
WORKDIR /opt/NPLRuntime
RUN git submodule init && git submodule update
RUN chmod +x npl_install.sh; sync; ./npl_install.sh && rm -rf /opt/NPLRuntime/bin && rm -rf /usr/local/include/boost
- 执行shell指令进行构建
docker build -t xuntian/npl-runtime ./
- 测试
docker run -dti -p 8099:8099 xuntian/npl-runtime
运行以上命令,如果能打开网页,则成功构建npl-runtime镜像
- 上传镜像至仓库
docker tag xuntian/npl-runtime 121.14.117.251:5000/npl-runtime
docker push 121.14.117.251:5000/npl-runtime
- 源代码url: https://github.com/tatfook/wikicraft -b wxa_dev
- Dockerfile
FROM xuntian/npl-runtime:latest
MAINTAINER xuntian "li.zq@foxmail.com"
RUN apt-get -y update && apt-get -y install nginx && apt-get clean && rm -rf /var/lib/apt/lists/*
ADD nginx_config /etc/nginx/sites-available/default
ADD ./ /opt/wikicraft/
EXPOSE 80
EXPOSE 8099
WORKDIR /opt/wikicraft
ENTRYPOINT ["./run.sh"]
- 构建指令
docker build -t xuntian/npl-keepwork ./
- 测试
docker run -dti -p 80:80 -p 8099:8099 xuntian/npl-keepwork
运行上面命令后,打开 主机IP:80 检查网页是否正常
- 上传仓库
docker tag xuntian/npl-keepwork 121.14.117.251:5000/npl-keepwork
docker push 121.14.117.251:5000/npl-keepwork
- docker in docker 安装存在问题,容器内的docker daemon会与宿主机的docker daemon冲突,就是jenkins服务暂时无法docker化
- 目前jenkins是安装在我实验室的香港服务器上的,因为在大富国内服务器上测试npl runtime时下载软件包,特别是boost包特别慢
- 解决docker in docker 问题
- gitlab服务的docker化