Giter Club home page Giter Club logo

docker-jenkins's Introduction

Jenkins Docker

Docker Pulls Build Status

Jenkins adaptation for running docker pipelines as a docker container.

Based on jenkinsci/blueocean Alpine image and adds user jenkins to the docker group (default GID 999) to allow it to run docker inside the container. You can fetch the latest image in docker hub, this image will use the GID 999 for the docker group. To use a different GID you need to build a new image.

Since version 1.1.0 Ansible has been added to the image enabling the usage of Ansible plugin for Jenkins

Requirements

To build this container you need to have docker installed. A makefile is provided along with the project to facilitate building and publishing of the images.

Configure and Install

Check the deploy.env file for build configurations. To publish the image to another repository you will need to change the DOCKER_REPO var to your repository location. This can also be a private repository.

You also need to check the GID of the docker group on the host machine and change the DOCKER_GID var accordingly.

Building the docker image

To create the image run:

make image

To create and publish a new version run:

make release

For more information on what it is possible to do

make help

Usage

To run this image you need to define a home folder. By default the home folder provided in the project is used. To start jenkins with default settings run:

make run

You can also start an instance using the docker command:

docker run -i -t --rm --name "jenkins" -v /var/run/docker.sock:/var/run/docker.sock -v $(PWD)/home:/var/jenkins_home -p "8080:8080" -p "50000:50000" stvfccn/jenkins

You can replace $(PWD)/home with the path the jenkins home folder

Usage with docker-compose

Use the following sample compose file to start this container in docker-compose:

version: '3.4'
services:
  jenkins: 
    image: stvfccn/jenkins
    restart: always
    container_name: jenkins
    privileged: true
    ports:
      - "8080:8080"
      - "50000:50000"
    volumes:
      - ./home:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock

Author

Paulo Costa

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Versions

  • 1.0.1 - jenkins 2.150.2
  • 1.0.2 - jenkins 2.164.1-2
  • 1.1.0 - jenknis >= 2.164.3 with support for ansible

License

This project is licensed under the MIT License - see the LICENSE file for details

docker-jenkins's People

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

coostax

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.