jenkinsci / docker Goto Github PK
View Code? Open in Web Editor NEWDocker official jenkins repo
Home Page: https://hub.docker.com/r/jenkins/jenkins
License: MIT License
Docker official jenkins repo
Home Page: https://hub.docker.com/r/jenkins/jenkins
License: MIT License
the git-client plugin fails to load correctly when added to plugins.txt:
the plugin.txt below is fails to load git-client and anything that depends on it
scm-api:0.2
git:2.3.5
git-client:1.16.1
github:1.11.3
github-api:1.67
github-oauth:0.20
from the logs
SEVERE: Failed Inspecting plugin /var/jenkins_home/plugins/git-client.hpi
java.io.IOException: Failed to expand /var/jenkins_home/plugins/git-client.hpi
...
...
Caused by: Error while expanding /var/jenkins_home/plugins/git-client.hpi
java.util.zip.ZipException: archive is not a ZIP archive
at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:192)
Forgive my ignorance, however it appears that the Jenkins images available from https://registry.hub.docker.com/_/jenkins/ are not up to date with the files that are maintained here (github).
For example I want to take advantage of the plugins.sh
script to add new plugins, when I click through the link for the latest (1.565.3) dockerfile (https://github.com/cloudbees/jenkins-ci.org-docker/blob/f744bdb73fbfc701a52105460511284a470bcfb8/Dockerfile) then I can see that it does not include the COPY plugins.sh
line that I would expect as seen here: https://github.com/cloudbees/jenkins-ci.org-docker/blob/master/1.565.3/Dockerfile
Am I missing something or do the Jenkins images in the official docker repo need updating?
I used "docker run -d -p 9000:8080 jenkins" to start Jenkins. After the message indicated "Jenkins is fully up and running", I tried to configure jenkins. Without changing any fields, I clicked Save and saw the following popup message:
TypeError: e.getAttribute is not a function
(form not submitted)
Is that an error that I am causing?
After starting the container, the webpage is correctly reachable but when I want to update the plugins, Jenkins throws me that :
Checking internet connectivity
Checking update center connectivity
Failed to resolve host name updates.jenkins-ci.org. Perhaps you need to configure HTTP proxy?
java.net.UnknownHostException: updates.jenkins-ci.org
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.testConnection(UpdateCenter.java:872)
at hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCenter(UpdateCenter.java:710)
at hudson.model.UpdateCenter$ConnectionCheckJob.run(UpdateCenter.java:1045)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
at java.lang.Thread.run(Thread.java:745)
I am able to run all my docker images...but whenever i am running jenkins container it is failing
docker run -p 8080:8080 jenkins
Error response from daemon: Cannot start container 32a832f36acad831ba0ec6be3af890281e90466063dc9c626820296fad36c5af: finalize namespace drop capabilities open /proc/1/status: permission denied
I tried all the other option you guys mentioned but no luck...
always getting the same issue.
Our SELINUX is disabled and running on centos6.6
Any help is really appreciated
~Suchi
Thanks for the official image. Not sure if this is the right place but I was pointed here from Docker hub.
Could additional resources be added to the docker registry page for the image?:
https://registry.hub.docker.com/_/jenkins/
For example the build agent has:
https://registry.hub.docker.com/u/maestrodev/build-agent/
Links
-Source Project Page
-Source Repository
Files
-Dockerfile
This would make navigating around the project much easier.
Recently, an official stackbrew image of Java was released.
One can use it with "FROM java:7" to get Java 7 for exemple.
Read more there : https://registry.hub.docker.com/_/java/
Howdy!
I'm unable to pull a copy of the official jenkins image at the moment.
I am able to pull other docker repos without any troubles.
The pull starts out ok, and starts to grab dependant layers but then falls over and gives the error:
1520f72eb8b6: Error pulling image (latest) from jenkins, Get https://registry-1.docker.io/v1/images/1520f72eb8b6f5c2d5cbe71431af204db2c1370fd36cd5b119103a3d3bf49550/ancestry: unexpected EOF b119103a3d3bf49550/ancestry: unexpected EOF
Seems like this issue: moby/moby#2151
If relevant, i'm in Australia, ACT.
I can't for the life of me find an answer to the problem though...
➜ jenkins-docker git:(master) ✗ make startdata
docker run -d --name jenkins-data mtscout6/jenkins-data echo Data-only container for Jenkins
d85097cd7b7668862159219eeca95ee1a65aaac4ebd4890b301d5e8c9d4af075
➜ jenkins-docker git:(master) ✗ make startserver
docker run -d -p 50000:50000 -p 3010:8080 --name jenkins-server --volumes-from jenkins-data jenkins:1.583
bdade9f59ccad3d77cbddf2fc4c431015ff3a9faad02b1ace065afa75bf59d09
➜ jenkins-docker git:(master) ✗ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bdade9f59cca jenkins:1.583 "/usr/local/bin/jenk 4 seconds ago Exited (0) 4 seconds ago jenkins-server
d85097cd7b76 mtscout6/jenkins-data:latest "echo Data-only cont 9 seconds ago Exited (0) 8 seconds ago jenkins-data
➜ jenkins-docker git:(master) ✗ docker logs -f jenkins-server
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Oct 09, 2014 3:57:33 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Oct 09, 2014 3:57:33 PM winstone.Logger logInternal
INFO: Winstone shutdown successfully
Oct 09, 2014 3:57:33 PM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.FileNotFoundException: /var/jenkins_home/war/META-INF/MANIFEST.MF (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:277)
at winstone.HostConfiguration.<init>(HostConfiguration.java:81)
at winstone.HostGroup.initHost(HostGroup.java:66)
at winstone.HostGroup.<init>(HostGroup.java:45)
at winstone.Launcher.<init>(Launcher.java:143)
at winstone.Launcher.main(Launcher.java:354)
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:293)
at Main.main(Main.java:98)
The make file I used here can be found at https://github.com/mtscout6/jenkins-docker
Server running on Ubuntu 14.01, I installed docker following docker installation document https://docs.docker.com/installation/ubuntulinux/ for latest version in docker
Got a 1.4 docker version
The jenkins official image is not able to access external world when the firewall is based on DROP main policy.
Everything is fine when I get back to earlier versions of docker
If you docker pull
jenkins:1.574 or jenkins:1.576 (the versions my work happens to be using), they are actually the latest LTS jenkins release rather than the advertised weekly release.
When these were published to docker hub, the Dockerfile used an apt style installation with the stable URL (which maxes out a 1.565.3) : http://pkg.jenkins-ci.org/debian-stable
The following command will confirm this for anyone:
docker pull jenkins:1.574 && docker history --no-trunc jenkins:1.574 | grep 'pkg.jenkins-ci.org'
# vs a working weekly branch dockerfile history:
docker pull jenkins:1.583 && docker history --no-trunc jenkins:1.583 | grep 'JENKINS_VERSION'
I'm not sure if this is the right place to ask but could these either be yanked (false advetising) or preferably re-built & pushed, using the latest weekly branch Dockerfile with the appropriate JENKINS_VERSION env set?
Not sure if its a bug or I don't understand it, but run without any options works fine, while this fails:
mkdir /opt/jenkins_home
docker run -p 9001:8080 -v /opt/jenkins_home:/var/jenkins_home jenkins
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Sep 26, 2014 3:02:19 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Sep 26, 2014 3:02:19 PM winstone.Logger logInternal
INFO: Winstone shutdown successfully
Sep 26, 2014 3:02:19 PM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.FileNotFoundException: /var/jenkins_home/war/META-INF/MANIFEST.MF (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:221)
at java.io.FileOutputStream.(FileOutputStream.java:171)
at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:277)
at winstone.HostConfiguration.(HostConfiguration.java:81)
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:354)
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:293)
at Main.main(Main.java:98)
WDYT about removing the extra tools installed? that's highly dependent on the user environment and would make the Docker image smaller ~ 100 MB.
It isn't needed for jenkins setups using slaves and for other users can be automatically installed from system config.
can be used to pass jenkins args using --env or to set in derived docker image as ENV JENKINS_OPT
It would be awesome if you allow passing in a configuration parameter when starting the docker container in order to set the time zone. Reading out the time zone from the host might not be always sufficient e.g.:
If your Jenkins instance is running in a different location than the user's (for example: the server is in NY but users are in LA), then the NY time zone will most probably be used, which may be quite annoying if you need to compare build dates.
https://wiki.jenkins-ci.org/display/JENKINS/Change+time+zone
An implementation similar to GITLAB_TIMEZONE would be great.
See here:
Could we add some checking of downloaded files to the Dockerfile?
At the moment the Dockerfile does:
RUN curl -L http://mirrors.jenkins-ci.org/war/1.596/jenkins.war -o /usr/share/jenkins/jenkins.war
There is no guarantee that this file has come from jenkins, hasn't been tampered with or corrupted in transit. It would be great if we could add a checksum or use a signature file if available. To see how to download files securely, have a look at the Wordpress and MongoDB Dockerfiles:
https://github.com/docker-library/wordpress/blob/990b1b00b8ca4903e11e53e908b1996fbaab3c1a/Dockerfile
https://github.com/docker-library/mongo/blob/fc66d9cbedac47806c7ae05b1b291c4ee32f6e6a/2.8/Dockerfile
Dears I can't access my Jenkins application from internet only from private network.
I already tried these step,
but nothing works any tip will be appreciated.
I have been working with a Jenkins image since february (version 1.580.2).
In this setup I mount a volume from the host into the container with this command:
sudo docker run --privileged -d -p 50000:50000 -p 80:8080 -v $(which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v /var/jenkins_home:/var/jenkins_home --name master jenkins
Today I pulled the new latest image from Jenkins and started the container again with the same command.
As I found out, the volume on the host does not get mounted into the container like before.
"Volumes": {
"/usr/bin/docker": "/usr/bin/docker",
"/var/jenkins_home": "/var/jenkins_home",
"/var/run/docker.sock": "/run/docker.sock"
},
"VolumesRW": {
"/usr/bin/docker": true,
"/var/jenkins_home": true,
"/var/run/docker.sock": true
}
"Volumes": {
"/usr/bin/docker": "/usr/bin/docker",
"/var/jenkins_home": "/var/jenkins_home",
"/var/run/docker.sock": "/run/docker.sock",
"var/jenkins_home": "/var/lib/docker/vfs/dir/ed65bb1157630e1a56776049b0537dbf03f1e34d96112b8f15a6cb7037d41257"
},
"VolumesRW": {
"/usr/bin/docker": true,
"/var/jenkins_home": true,
"/var/run/docker.sock": true,
"var/jenkins_home": true
}
It seem that the mount of the volume /var/jenkins_home
gets overwritten a second time.
Even after updating the host to use the newest docker version, I still get the same problem:
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
I am using docker on aufs instead of device-mapper.
Let users define a set of plugins to be installed - for sample, using support-core txt format "id:version" - and define an ONBUILD command to install them.
As a result, defining a custom docker image for jenkins with a set of plugins will just be creating this txt file + a minimal Dockerfile.
I don't know if this is due to a problem with the gradle plugin or the jenkins docker
Here is how I run docker jenkins:
docker run -d -p 8080:8080 -u root -v /var/jenkins_home:/var/jenkins_home jenkins
I use Configure Jenkins > Gradle install from .org and configure my workspace accordingly.
( I've also tried a restart )
Appears to be a permission problem:
Checking out Revision 6f00e5a09c3f2361938c4d78eda6f253e0fbb6b2 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 6f00e5a09c3f2361938c4d78eda6f253e0fbb6b2
> git rev-list 6f00e5a09c3f2361938c4d78eda6f253e0fbb6b2 # timeout=10
[Gradle] - Launching build.
[workspace] $ /var/jenkins_home/tools/hudson.plugins.gradle.GradleInstallation/Gradle_2.1/bin/gradle copyJars
FATAL: command execution failed
java.io.IOException: Cannot run program "/var/jenkins_home/tools/hudson.plugins.gradle.GradleInstallation/Gradle_2.1/bin/gradle" (in directory "/var/jenkins_home/jobs/mustash/workspace"): error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:780)
at hudson.Launcher$ProcStarter.start(Launcher.java:360)
at hudson.Launcher$ProcStarter.join(Launcher.java:367)
at hudson.plugins.gradle.Gradle.performTask(Gradle.java:262)
at hudson.plugins.gradle.Gradle.perform(Gradle.java:116)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
at hudson.model.Build$BuildExecution.build(Build.java:198)
at hudson.model.Build$BuildExecution.doRun(Build.java:159)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1706)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:232)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 16 more
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE```
I'm trying to use the scm-sync-config plugin in jenkins and that needs a ssh key in $JENKINS_HOME/.ssh/id_pub
I tried ADD and COPY but those don't respect the user they are run as, so the ssh folder is owned by root. Since /var/jenkins_home is a volume chmod does not work either.
Any ideas on how I can get a ssh key into that location owned by the jenkins user?
I am unable to create projects. I created my host directory:
mkdir /data/jenkins
chmod 777 /data/jenkins
I am using the following docker command:
docker run
--name jenkins
-p 28080:8080
-p 50000:50000
--rm=true
-v /data/jenkins:/var/jenkins_home
jenkins
I can connect to Jenkins on port 28080. And I can click the New Item link. But after entering a project name and selecting 'maven project', then OK button remains inactive and unresponsive.
I see no console error messages.
Have you seen this behaviour before?
Do I need to configure Jenkins before creating projects? If so, can the documentation be updated about what needs to be configured?
When attempting to define a set of plugins to be included via the plugins.txt file, the last line of plugins.txt file is ignored if a new line is not present on that last line. While this the default POSIX behavior, it is easy to overlook and a workaround is easily included in the plugins.sh (pull request forthcoming shortly after some testing a fork is complete) to allow it to transparently consider all lines in the plugins.txt file.
Since a new Jenkins version has been releast, a fresh jenkins:latest
container "complains" that it's outdated. Please provide the most recent version to match upstream.
Best regards,
Manuel
Current weekly release at 1.610 (2015/04/19) - weekly branch is at 1.605 (2015/03/16). Should the weekly docker image reflect the very latest weekly release?
Hi there,
Is there a way to setup the Docker run to properly setup the machine behind an HTTP Proxy? I'm using the host's network and the http_proxy
environment variable. Jenkins automatically identifies that...
$ docker run -d -p 80:8080 --net host -e http_proxy=http://qypprdproxy02.ie.xxxx.net:80 platform.registry.docker.corp.xxxx.net/cicd/jenkins
95d595181a9e1cca8d295804e84ea102baa41056042c99e5a6530af4a59c9285
However, It cannot download the plugins...
root at pppdc9prd505 in /app/docker-jenkins on git:master o [0:07:11]
$ docker logs -f 95d5
--2015-02-07 08:06:57-- http://updates.jenkins-ci.org/latest//hipchat.hpi
Resolving qypprdproxy02.ie.xxxx.net (qypprdproxy02.ie.xxxx.net)... 10.158.64.16
Connecting to qypprdproxy02.ie.xxxx.net (qypprdproxy02.ie.xxxx.net)|10.158.64.16|:80... connected.
Proxy request sent, awaiting response... 302 Found
Location: https://updates.jenkins-ci.org/download/plugins/hipchat/0.1.8/hipchat.hpi [following]
--2015-02-07 08:06:57-- https://updates.jenkins-ci.org/download/plugins/hipchat/0.1.8/hipchat.hpi
Resolving updates.jenkins-ci.org (updates.jenkins-ci.org)... 199.193.196.24
Connecting to updates.jenkins-ci.org (updates.jenkins-ci.org)|199.193.196.24|:443... failed: Connection timed out.
Retrying.
--2015-02-07 08:08:02-- (try: 2) https://updates.jenkins-ci.org/download/plugins/hipchat/0.1.8/hipchat.hpi
Connecting to updates.jenkins-ci.org (updates.jenkins-ci.org)|199.193.196.24|:443... failed: Connection timed out.
Retrying.
--2015-02-07 08:09:07-- (try: 3) https://updates.jenkins-ci.org/download/plugins/hipchat/0.1.8/hipchat.hpi
Connecting to updates.jenkins-ci.org (updates.jenkins-ci.org)|199.193.196.24|:443... failed: Connection timed out.
Retrying.
Is there anything else I'm missing?
thanks!
I try to use jenkins:weekly
as a base image for injecting my own default jobs, tools, configs and plugins. Adding them works fine, but since /var/jenkins_home
has been marked as a volume in jenkins:weekly
, chown -R jenkins:jenkins /var/jenkins_home/
has no effect on the resulting image.
Here is my Dockerfile:
FROM jenkins:weekly
USER root
ADD jobs/ /var/jenkins_home/jobs/
ADD tools/ /var/jenkins_home/tools/
ADD configs/ /var/jenkins_home/
ADD plugins/ /var/jenkins_home/plugins/
RUN chown -R jenkins:jenkins /var/jenkins_home/
USER jenkins
If I run the intermediary image resulting from the last ADD
instruction and run the chmod
command, I can verify that the volume can be changed at run-time - but this does not help, as I want that change to be persisted in my image.
Why do you make /var/jenkins_home
a volume?
NOTE:
This will store the jenkins data in /your/home on the host. Ensure that /your/home is accessible by the jenkins user in container (jenkins user - uid 1000).
STEP:
i just clone the repo, and build the image, then run:
docker run --name jenkins -p 8080:8080 -v /data/jenkins:/var/jenkins_home 192.168.1.175:5000/hwangjr/jenkins
but i just get error:
mkdir: cannot create directory ‘/var/jenkins_home/init.groovy.d’: Permission denied
cp: cannot create regular file ‘/var/jenkins_home/init.groovy.d/tcp-slave-agent-port.groovy’: No such file or directory
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Jun 12, 2015 2:33:41 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jun 12, 2015 2:33:41 PM winstone.Logger logInternal
INFO: Winstone shutdown successfully
Jun 12, 2015 2:33:41 PM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.FileNotFoundException: /var/jenkins_home/war/META-INF/MANIFEST.MF (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:280)
at winstone.HostConfiguration.<init>(HostConfiguration.java:83)
at winstone.HostGroup.initHost(HostGroup.java:66)
at winstone.HostGroup.<init>(HostGroup.java:45)
at winstone.Launcher.<init>(Launcher.java:143)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at Main._main(Main.java:293)
at Main.main(Main.java:98)
SOLUTION:
from google, i found one solution is to set /data/jenkins to 1000, but it just for ubuntu system:
chown 1000:1000 -R /data/jenkins
BUT:
My system is centos7, not ubuntu. so even i set "chmod 777 -R /data/jenkins", i still get this error. this error is the AUFS error, anyone have solutions?
HELP~~~
This image does not clean up zombie processes. Zombie processes may appear when job fails.
many non-java projects need to have additional deps installed to build but there is no option to automate it from jenkins as there is no sudo installed.
Sudo without password would allow to just add sth like:
if [ ! -e /usr/bin/make ] ; then
sudo apt-get update && sudo apt-get install -y build-essential
fi
to build script to install needed deps for C app
Since you say how to expose it online, ideally it should describe how to secure it as well ;)
the -v /home/jenkins_home won't work as it's not made available as volume
From the official Jenkins Docker Hub Repo instructions
If your volume is inside a container - you can use
docker cp $ID:/var/jenkins_home
command to extract the data.
Unfortunately this doesn't function as expected.
$ docker pull jenkins
$ docker run -p 2375:8080 -t jenkins
$ docker cp [container_id | name]:/var_jenkins_home .
have the var_jenkins_home
directory be copied to the docker host
the following is present / copied
.bash_logout
.bashrc
.profile
Please advise whether this is expected behavior, and simply a matter of mis-understanding, or an issue to be addressed. Thank you.
$ docker version
Client version: 1.3.3
Client API version: 1.15
Go version (client): go1.3.2
Git commit (client): 5dc1c5a
OS/Arch (client): linux/amd64
Server version: 1.3.3
Server API version: 1.15
Go version (server): go1.3.2
Git commit (server): 5dc1c5a
Hey guys!
I'm having issues installing a plugin. I copied plugins.sh to my local computer and ran that in my plugins.txt and that worked just fine. But in my docker container I can't seem to get it working. Le tme know if there's any other info I can provide!
here's my Dockerfile
FROM jenkins
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
and plugins.txt
scm-sync-configuration
I'm getting this error:
Jun 03, 2015 7:55:59 PM jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Inspecting plugin /var/jenkins_home/plugins/scm-sync-configuration.hpi
java.io.IOException: Failed to expand /var/jenkins_home/plugins/scm-sync-configuration.hpi
at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:513)
at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:164)
at hudson.PluginManager$1$3$1.run(PluginManager.java:253)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:903)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: Error while expanding /var/jenkins_home/plugins/scm-sync-configuration.hpi
java.util.zip.ZipException: archive is not a ZIP archive
at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:192)
at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:132)
at hudson.ClassicPluginStrategy.unzipExceptClasses(ClassicPluginStrategy.java:585)
at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:510)
... 10 more
Caused by: java.util.zip.ZipException: archive is not a ZIP archive
at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:481)
at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:320)
at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:186)
at org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:170)
... 13 more
Is there not a way you could mount external volumes on the machine and automatically chown 1000 them on startup? Currently on Google Container Engine it is very difficult to get this running due to finding the external volume and trying to get it to mount. Requires root access to the host in order to chown the external hard drive before starting jenkins.
Per this Super User post, I'm having issues with my Jenkins instance due to (1) the lack of make
in the image and (2) the lack of sudo
, prohibiting me from installing make
. Could we either add the sudo
command, or not specify USER
in the Dockerfile?
I want to install phantomjs in this container to run tests, but I fail to do that.
Here is the build steps:
Sending build context to Docker daemon 116.6 MB
Sending build context to Docker daemon
Step 0 : FROM jenkins
---> 41001f44325b
Step 1 : USER root # if we want to install via apt
---> Using cache
---> b30f15951f60
Step 2 : RUN apt-get install g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev && cd ~
---> Running in 6bada795be5b
INFO[0011] finalize namespace setup user get supplementary groups Unable to find user root # if we want to install via apt
Dockerfile
FROM jenkins
USER root # if we want to install via apt
RUN apt-get install g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev && cd ~
ENV PHANTOM_JS="phantomjs-1.9.7-linux-x86_64"
ADD https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 /usr/local/share/
RUN cd /usr/local/share/ && tar xvjf $PHANTOM_JS.tar.bz2
RUN ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/share/phantomjs
RUN ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs
RUN ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin/phantomjs
USER jenkins # drop back to the regular jenkins user - good practice
Any thoughts on that? Thanks in advance.
what is the benefits of running jenkins in docker container?
Hello!
I'm spending some time dockerizing some services, and this image is helping me a lot 🤘
But I'm having troubles cloning or fetching data from a repository using an SSH transport, I've looked inside the image, and I have found that jenkins user has its home in /var/lib/jenkins not in /var/jenkins_home directory so ssh tries to look for keys in /var/lib/jenkins/.ssh
Thus, I'm not pretty sure about the next step, perhaps I should go through SSH credentials plugin instead of messing up with docker image, or perhaps the image should use /var/jenkins_home as HOME for the jenkins user.
What do you think?
By default that docker image makes Jenkins to output the logs to stdout.
But when a problem occurs and we have to check the app logs, we can't as when we attach to the running container, we don't see what happened previously.
It would be good to add an option (env variable ?) to store the jetty logs somewhere in order to analyze them later.
When I add a newer version of a built-in plugin like javadoc, to my plugins.txt file, I've noticed that it doesn't show up when the container is run. I specify javadoc:1.3 in the plugins.txt file, and build my image. I've verified that building the image downloads the correct version, and places it in the /usr/share/jenkins/ref/plugins directory. When the container is run, the jenkins.sh script does in fact copy it into /var/jenkins_home/plugins directory. However, when the jenkins.war file is run, it extracts the built-in version, and overwrites the one I wanted. This results in the older version being used.
When access to jenking container example via exec bash enviroment
need root privileges but is not possible.
docker exec -it [container_id] bash
Example there is no sudo or su to root user does not work
su command gives error
su: must be run from a terminal
Sudo or root access is need for make config manualy or update .war file to
container.
The documentation is pretty clear about how to get the instance up and running, but if you're using boot2docker on OS X, then you need to execute:
boot2docker ip
in order to get the host machine IP address of boot2docker, then, you would use that IP address in the browser instead of 0.0.0.0 or localhost to access the UI.
Running the latest tag on CentOS 7 & Docker 0.11.1, Jenkins fails to bind the port:
Failed to listen to incoming slave connection
java.net.BindException: Failed to listen on port 50000 because it's already in use.
at hudson.TcpSlaveAgentListener.<init>(TcpSlaveAgentListener.java:75)
at jenkins.model.Jenkins.<init>(Jenkins.java:825)
at hudson.model.Hudson.<init>(Hudson.java:82)
at hudson.model.Hudson.<init>(Hudson.java:78)
at hudson.WebAppMain$3.run(WebAppMain.java:222)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at hudson.TcpSlaveAgentListener.<init>(TcpSlaveAgentListener.java:73)
... 4 more
The port isn't used on the host.
The default installation is unsecured, but at least it tells me to enable security. (So I had to wipe the instance, firewall the port, and recreate the instance, to ensure the guess was clean; luckily this just wasted a bit of time, but I'd have preferred a warning in the docs).
However, it doesn't mention to enable SSL, it doesn't warn me when I enable plaintext authentication (which is probably a separate issue), so this seems overly insecure by default. It seems that starting with SSL (and a self-signed certificate) would be better.
That error occurs when trying tio run de container when building the image. Any idea? I'm a newbie with Docker.
The documentation on how to use volumes with Jenkins is a bit misleading at the minute. Whoever wrote it seems to think that if the volumes aren't bind mounted to a specified host directory and are transient, which isn't the case - the only difference is they are bound to a directory controlled by docker.
For example, "Backing Up Data" instructs users to use docker cp
if they haven't bind mounted the volume, but you don't need to do this. Instead you can just ask Docker where the volume lives on the host e.g:
$ docker inspect -f '{{index .Volumes "/var/jenkins_home"}}' gloomy_carson
/var/lib/docker/vfs/dir/563c1842d05b2ffd5686de299f533a1525cc9de889a7ec961c06856ed3e749a7
And I can just backup that folder.
I'm happy to come up with a new wording and create a pull-request, but I thought you might prefer to reword it yourselves.
It always returns 503 error, and cannot set upstream, for reverse proxy. Btw, I am using jwilder/nginx-proxy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.