Hi all,
I am currently dealing with very weird behaviour of my Jenkins instance. I
want to use docker containers via pipeline to build my app. But everytime I
tried even something simple like this:
node() {
stage('Build') {
docker.image('debian:stretch').inside() {
sh 'sleep 20'
}
}
}
Jenkins kills the container after less than 1 second without any
explanaition anywhere (see attached stretch.log). But what is interesting,
when I change docker image to debian:jessie (oldstable), everything is
working correctly (see attached jessie.log). I also tried executing same
code on jessie and stretch nodes, but it was exactly the same.
Can you please help me or at least give some hints/links? I am really
stucked and out of ideas. I am using Jenkins 2.73.1 with all plugins
updated (today) running directly on Debian Jessie host.
Thank you in advance,
Jan Stourac.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/1e65b831-72fc-41b8-b38e-0f1afebbc046%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Started by user admin
[Pipeline] node
Running on master in /var/lib/jenkins/workspace/test
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] sh
[test] Running shell script
+ docker inspect -f . debian:jessie
.
[Pipeline] withDockerContainer
Jenkins does not seem to be running inside a container
$ docker run -t -d -u 108:113 -w /var/lib/jenkins/workspace/test -v
/var/lib/jenkins/workspace/test:/var/lib/jenkins/workspace/test:rw,z -v
/var/lib/jenkins/workspace/test@tmp:/var/lib/jenkins/workspace/test@tmp:rw,z -e
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e
******** --entrypoint cat debian:jessie
[Pipeline] {
[Pipeline] sh
[test] Running shell script
+ sleep 20
[Pipeline] }
$ docker stop --time=1
aee0eb563f8a7666f9cce9c23b5607906cef9466323f048dc612a42d4fe7c570
$ docker rm -f aee0eb563f8a7666f9cce9c23b5607906cef9466323f048dc612a42d4fe7c570
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESSStarted by user admin
[Pipeline] node
Running on master in /var/lib/jenkins/workspace/test
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] sh
[test] Running shell script
+ docker inspect -f . debian:stretch
.
[Pipeline] withDockerContainer
Jenkins does not seem to be running inside a container
$ docker run -t -d -u 108:113 -w /var/lib/jenkins/workspace/test -v
/var/lib/jenkins/workspace/test:/var/lib/jenkins/workspace/test:rw,z -v
/var/lib/jenkins/workspace/test@tmp:/var/lib/jenkins/workspace/test@tmp:rw,z -e
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e
******** -e ******** -e ******** -e ******** -e ******** -e ******** -e
******** --entrypoint cat debian:stretch
[Pipeline] {
[Pipeline] sh
[test] Running shell script
+ sleep 20
[Pipeline] }
$ docker stop --time=1
ece1d7bae016d0848edf035696fa627d7db736a33d3e13c5bb02bc17b709c1fd
$ docker rm -f ece1d7bae016d0848edf035696fa627d7db736a33d3e13c5bb02bc17b709c1fd
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -1
Finished: FAILURE