Pipeline with docker

20 views
Skip to first unread message

John Norris

unread,
Jul 10, 2018, 12:10:05 PM7/10/18
to Jenkins Users
I notice that when agent -> dockerfile builds an image, it also creates a container and runs it. So the console output includes...

Jenkins does not seem to be running inside a container
$ docker run -t -d -u 117:126 -w /var/lib/jenkins/workspace/pipelineTest -v /var/lib/jenkins/workspace/pipelineTest:/var/lib/jenkins/workspace/pipelineTest:rw,z -v /var/lib/jenkins/workspace/pipelineTest@tmp:/var/lib/jenkins/workspace/pipelineTest@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 ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** d9121013231cf8a1996a36dc0c76b6fd13609d88 cat
$ docker top 54978ce2568be5505ebc2990e89fc141a53a31e5a50f281b8bd02fa019aa2f39 -eo pid,comm
ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.

Is there anyway an agent -> dockerfile entry can simply build?
Or am I better off doing this as a series of shell commands?

Regards,
John
Reply all
Reply to author
Forward
0 new messages