Giter VIP home page Giter VIP logo

docker-jenkins's Introduction

docker-jenkins

Sets up a container with jenkins installed listening on port 8080.

Usage

To run the container, do the following:

docker run -d -P aespinosa/jenkins

docker ps
CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                     NAMES
1131d37c38b1        aespinosa/jenkins:latest    java -jar /opt/jenki   12 seconds ago      Up 12 seconds       0.0.0.0:49153->8080/tcp   drunk_fermi

Your jenkins instance is now available by going to http://localhost:49153 .

Persistent Configuration

By default, JENKINS_HOME is set to /jenkins. The best way to persist or import configuration is to have a separate data volume for /jenkins. Below are a few references on data volumes.

Building

To build the image, simply invoke

docker build github.com/aespinosa/docker-jenkins

A prebuilt container is also available in the docker index

docker pull aespinosa/jenkins

Author

LICENSE

Copyright 2013-2016 Allan Espinosa

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

docker-jenkins's People

Contributors

aespinosa avatar bfirsh avatar gmacario avatar jplock avatar moritzfl avatar sherzberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-jenkins's Issues

Jenkins Keys, Git Idenetities, etc

Just throwing the question out there, but how would you suggest modifying this to create a useful Jenkins server complete with ssh keys for Git, a git identity for tagging and pushing commits, etc?

Do you do this by hand, and recommit your image, or do you maintain a private version of this Dockerfile with more information?

Where to run the builds?

Hi,

I have installed this container running jenkins. But where to run the build jobs? As ssh access to container is not recommended.

Thanks

How to install plugins in jenkins

Hello,

I installed plugins in the jenkins and then committed the image (docker commit). But point is, when running a new container whith this image, I don't have that plugin installed. Is there a way to persist plugin installation using only docker or I must use a persistent volume?

Regards,

slave connections

Can we do master slave setup where slave jobs can be spun in individual docker containers and destroyed once build is done? Thx

No available plugins seen

When I use this war.. I don't see available plugins. Basically wanted to install jenkins Git plugin.

Crash on run v1.527

This is the crash I get when trying to run aespinosa/jenkins:1.527 (I had to specify the tag, because strangely the latest tag seems unavailable)

Oct 08, 2013 5:03:37 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Oct 08, 2013 5:03:37 AM javax.jmdns.impl.HostInfo newHostInfo
WARNING: Could not intialize the host network interface on nullbecause of an error: bac3429ed824: bac3429ed824: Name or service not known
java.net.UnknownHostException: bac3429ed824: bac3429ed824: Name or service not known
        at java.net.InetAddress.getLocalHost(InetAddress.java:1438)
        at javax.jmdns.impl.HostInfo.newHostInfo(HostInfo.java:75)
        at javax.jmdns.impl.JmDNSImpl.<init>(JmDNSImpl.java:407)
        at javax.jmdns.JmDNS.create(JmDNS.java:60)
        at hudson.DNSMultiCast$1.call(DNSMultiCast.java:32)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.net.UnknownHostException: bac3429ed824: Name or service not known
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258)
        at java.net.InetAddress.getLocalHost(InetAddress.java:1434)
        ... 9 more

Cannot mount volume using -v <host-volume>:/jenkins

Hey :-)

When I try to run your jenkins docker image, it stucks at the Initializing state.

image

Here is my comand :

docker run -P -v volume-on-host:/jenkins aespinosa/jenkins

Have you got an idea of this issue ?

Thank you

Olivier

Error trying to to run the image using -ti /bin/bash

I am trying to run the image in terminal interactive mode: docker run -it and I am getting this. Any ideas?

Running from: /opt/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
May 29, 2016 8:07:51 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Logging initialized @572ms
May 29, 2016 8:07:51 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
May 29, 2016 8:07:51 PM winstone.Logger logInternal
INFO: Winstone shutdown successfully
May 29, 2016 8:07:51 PM winstone.Logger logInternal
SEVERE: Container startup failed
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:215)
at java.util.zip.ZipFile.(ZipFile.java:145)
at java.util.jar.JarFile.(JarFile.java:154)
at java.util.jar.JarFile.(JarFile.java:118)
at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:263)
at winstone.HostConfiguration.(HostConfiguration.java:83)
at winstone.HostGroup.initHost(HostGroup.java:66)
at winstone.HostGroup.(HostGroup.java:45)
at winstone.Launcher.(Launcher.java:143)
at winstone.Launcher.main(Launcher.java:352)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at Main._main(Main.java:246)
at Main.main(Main.java:91)

Making jenkins available in the network

When I do boot2docker ip it returns The VM's Host only interface IP address is: 192.168.59.103
and when I go to
http://192.168.59.103:49153/
I see the jenkins server there.

However when my coworker (who is on the same network) goes there it doesnt work.

If it helps the ip address of my jenkins server is 192.168.200.*

jenkins-cli connection to containerized jenkins server gets chunked

Hi there,

Started the container:
sudo docker run -d -P -name="docker-jenkins" docker-jenkins

Using the jenkins-cli on from my desktop:
java -jar jenkins-cli.jar -s http://jenkins.example.com:49153/ help

Aug 09, 2014 5:35:08 PM hudson.remoting.SynchronousCommandTransport$ReaderThread run
SEVERE: I/O error in channel Chunked connection to http://jenkins.example.com:49153/cli
java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
at java.io.ObjectInputStream.(ObjectInputStream.java:299)
at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:40)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

Exception in thread "main" hudson.remoting.RequestAbortedException: > hudson.remoting.RequestAbortedException: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:41)
at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:34)
at hudson.remoting.Request.call(Request.java:174)
at hudson.remoting.Channel.call(Channel.java:739)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:168)
at hudson.remoting.$Proxy1.waitForProperty(Unknown Source)
at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1122)
at hudson.cli.CLI.(CLI.java:145)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:459)
at hudson.cli.CLI.main(CLI.java:382)
Caused by: hudson.remoting.RequestAbortedException: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
at hudson.remoting.Request.abort(Request.java:299)
at hudson.remoting.Channel.terminate(Channel.java:802)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69)
Caused by: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
at java.io.ObjectInputStream.(ObjectInputStream.java:299)
at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:40)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

This is not reproducible if jenkins is running directly on the server (outside the container).
Any ideas what might be missing?

Many thanks,
Artur Martins

Support https

Hi, I'm a docker newbie maybe this feature is completely absurd:

Make a way for the image to easily support https

Add Jenkins Follower and Plugin Configs to Subfolder of Dockerfile?

I read #10 about how to add Git that you would like to have it separate and I think that makes sense. Two questions about your thoughts.

1.Plugins; I have quite a few plugins we need to make Jenkins work for us. How do you suggest adding them in to the Docker?

2.Client-Server, Leader-Follower ; This Dockerfile is for a single isolated master, and some situations will need to have Agent machines running builds. How do you suggest doing that?

It seems to me as you suggested for CoreOS #26, perhaps they could be incorporated in subfolders? thank you!
AnneTheAgile

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.