Giter Club home page Giter Club logo

docker-jenkins's Introduction

docker-jenkins

docker pull dustise/jenkins

A Customizable docker image for Jenkins. With this image , you can simply add your own init groovy script, set your first administrator, even change the default config.xml.

And you can simply execute the command install-plugins.sh plugin-name to download and install plugins and their dependencies.

Added some CI/CD related tools into the image. Following the latest LTS version of Jenkins. Support both Master or Slave mode.

Code for adding first user, comes from project issue of geerlingguy, thank you.

install-plugins.sh and jenkins-support copied from Jenkins docker.

一个定制化程度较高的 Jenkins 镜像,跳过了系统的缺省初始化过程,在使用中可以方便的加入自己的 Groovy 初始化代码、设置初始用户,以及替换 config.xml。

提供了 install-plugins.sh 脚本,用于安装插件及其依赖。

另外还添加了一些 CI/CD 相关的工具。同时支持 Jenkins 的 Master 和 Slave 模式。

镜像会不定期跟踪更新 Jenkins 的 LTS 版本。

Run

docker run -it -p 3001:8080 --rm
-e ADMIN_PASSWORD="MY_PaSS_W0rd"
-e ADMIN_USER="administrator"
--name=jenkins
dustise/jenkins:latest

Build your own image

Build a new image with git support and some config file

Example:


FROM dustise/jenkins
COPY my_pretty_config.xml /usr/share/jenkins/config/config.xml
COPY some_strange_code.groovy /usr/share/jenkins/config/
RUN install-plugins.sh git

Include

  • Alpine Linux
  • Oracle JDK 8u171
  • Jenkins 2.107.3
  • Maven 3.5.3
  • Kubectl 1.10.2
  • Sonar Scanner 3.1.0.1141-linux
  • Robot Framework
  • Jenkins Slave 3.9
  • Ansible

Volumes

  • /usr/share/jenkins/config: Volume for initialization:

    • Any *.groovy in it will be copied in to $JENKINS_HOME/init.groovy.d/

    • Any *.xml in it will be copied in to $JENKINS_HOME

  • /data/jenkins: Jenkins home

  • /data/kube: you can copy your kube config here.

  • /data/maven: Anything in /data/maven/conf will be copied (OVERWRITE) into /usr/local/share/maven/conf,

  • /data/sonar: Anything in /data/maven/conf will be copied (OVERWRITE) into /usr/local/share/sonar/conf,

  • /data/robot: Result here

Ports

  • 8080: Jenkins

Env

Name Default Value Comment
JAVA_HOME /usr/lib/java
TIMEZONE Asia/Shanghai Will change the system settings, and Jenkins will use it when start up.
JENKINS_MODE MASTER MASTER or SLAVE
MAVEN_HOME /usr/local/share/maven
SONAR_HOME /usr/local/share/sonar
JENKINS_HOME /data/jenkins
ADMIN_USER root
ADMIN_PASSWORD abcd!@#$

docker-jenkins's People

Contributors

dustise avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.