Giter Club home page Giter Club logo

jenkins's Introduction

jenkins-ist

Github repo for automated builds of a custom version of Jenkins on docker hub.

Installation

Ensure /data/jenkins/ directory is created and has the correct permissions.

  • If you are using vagrant, the directory should be owned by vagrant. If you are logged in to an Ubuntu EC2 instance, then the ubuntu user should own the directory.
  • If it needs to be created:
    1. Run sudo mkdir /data
    2. Run sudo mkdir /data/jenkins
    3. Run sudo chown 1000 /data/jenkins

Building

To build the Jenkins docker image that you want to run in a container. Ensure you are in the /jenkins directory with the Dockerfile and run

docker build -t istresearch/jenkins:[Version]

Alternatively you can do.

docker-compose build

The first approach allows you to specify the tags that you want to use for the docker image. Meanwhile, with the second approach, you are forced to use whatever is defined in the docker-compose.yml file

Running

To run the container, type the following

# Run without mounting the docker socket
docker run \
  -d \
  --name jenkins \
  --net=host \
  -p 8080:8080 \
  -p 5000:5000 \
  -v /data/jenkins:/var/jenkins_home \
  -u 1000 \
  istresearch/jenkins:latest

# Run with the docker socket mounted
docker run \
  -d \
  --name jenkins \
  --net=host \
  -p 8080:8080 \
  -p 5000:5000 \
  -v /data/jenkins:/var/jenkins_home \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -u 1000 \
  istresearch/jenkins:latest
  • -d to run in the background
  • --net=host so the container shares the host network stack and has access to the /etc/hosts for network communication
  • -p 8080:8080 so the 8080 port in the container receives all requests to port 8080 on the host. Jenkins runs on Tomcat, which uses port 8080 as the default
  • -p 5000:5000 required to attach slave servers; port 50000 is used to communicate between master and slaves
  • -v /data/jenkins:/var/jenkins_home to bind host directory /data/jenkins to the container directory /var/jennkins_home
  • -v /var/run/docker.sock:/var/run/docker.sock Mounts the docker socket into the container
  • -u 1000 jenkins user uid is 1000, same as ubuntu and vagrant uid's are 1000

Alternatively, you can run one of the following

# Uses the istresearch/jenkins:latest image
docker-compose up -d

# Runs a local dev version, which allows you to modify the Dockerfile for local experimentation.
docker-compose -f docker-compose.yml -f docker-compose-dev.yml up -d

jenkins's People

Contributors

artem-ist avatar brascher avatar deecav avatar jasonrhaas avatar joequery avatar rdempsey avatar richselfridgeist avatar trevore 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.