Git Product home page Git Product logo

docker-centos-jenkins's Introduction

docker-centos-jenkins

A Dockerfile that produces a CentOS-based Docker image that will run the latest stable Jenkins.

The build is based on [internavenue/docker-centos-base][docker-centos-base].

Included packages (and their dependencies)

  • Jenkins
  • OpenJDK 1.7

Image Creation

This example creates the image with the tag internavenue/centos-jenkins, but you can change this to use your own username.

$ docker build -t="internavenue/centos-jenkins" .

Alternately, you can run the following if you have GNU Make installed...

$ make

You can also specify a custom docker username like so:

$ make DOCKER_USER=internavenue

Container Creation / Running

The Nginx web server is configured to store web root in /srv/www inside the container. You can map the container's /srv/www volume to a volume on the host so the data becomes independant of the running container.

This example uses /srv/docker/lon-dev-web to host the web application, but you can modify this to your needs.

When the container runs, it creates a superuser with a random password. You can set the username and password for the superuser by setting the container's environment variables. This lets you discover the username and password of the superuser from within a linked container or from the output of docker inspect web1.

$ mkdir -p /srv/docker/lon-dev-web
$ docker run -d -name="web1" \
             -p 127.0.0.1:80:80 \
             -v /srv/docker/lon-dev-web:/srv/www \
             -e USER="super" \
             -e PASS="Whatz03v3r" \
             internavenue/nginx

Alternately, you can run the following if you have GNU Make installed...

$ make run

You can also specify a custom port to bind to on the host, a custom web root directory, and the superuser username and password on the host like so:

$ sudo mkdir -p /srv/docker/lon-dev-web
$ make run PORT=127.0.0.1:8080 \
           DATA_DIR=/my/spec/data/dir \
           USER=super \
           PASS=Whatz03v3r

docker-centos-jenkins's People

Contributors

aries1980 avatar

Watchers

James Cloos 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.