Skip to content

aoki/docker-jenkins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alpine Jenkins Dokcer Container

stars pulls automated build build status

  • Alpine Linux based.
  • Jenkins with BlueOcean plugin.
  • Installed dokcer and docker-compose command.

This image is created based on jenkins:alpine. Please details and options see jenkins:alpine.

Run

docker pull ringo/jenkins
docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /var/lib/jenkins:/var/jenkins_home \
  -p 8080:8080 -p 50000:50000 \
  --name jenkins -d -u root ringo/jenkins

Build

docker build -t ringo/jenkins .

Execute docker inside container

Share /var/run/docker.sock file between host and container.

Execute docker inside container

Jenkins BlueOcean Plugin

Jenkins BlueOcean Plugin

Sample Jenkinsfile

#!groovy

pipeline {
  agent {docker 'ringo/sbt'}
  stages {
    stage('lint') {
      steps {
        sh 'echo "Execute scalastyle check"'
      }
    }
    stage('outdated') {
      steps {
        sh 'echo "Check library outdated"'
      }
    }
    stage('test') {
      steps {
        sh 'echo "Run test and covarage"'
      }
    }
    stage('release') {
      steps {
        sh 'echo "Release"'
      }
    }
  }
}