How to start vnc server inside Jenkins docker container?

617 views
Skip to first unread message

Павло Галета

unread,
Jan 4, 2019, 8:53:20 AM1/4/19
to Jenkins Developers
I've successfully installed Jenkins with blueocean plugin by Docker.
But I have a problem with running one of my pipeline.

It says that I need to install vnc server, but how can I do this inside docker container?

... Starting xvnc
14:00:03 [mytestpipeline] $ vncserver :82 -localhost -nolisten tcp
14:00:03 ERROR: Failed to parse POMs 14:00:03 java.io.IOException: Cannot run program "vncserver" (in directory "/var/jenkins_home/workspace/mytestpipeline"): error=2, No such file or directory

Mark Waite

unread,
Jan 4, 2019, 9:01:34 AM1/4/19
to jenkinsci-dev
If you're running the job on an agent, then assure that vncserver is installed on the agent.  

If you're using a static agent that is provided by a Docker image, then modify the Docker image of that agent to install vncserver in the agent.  Label the agent to remind you that vncserver is installed on the agent, then define the job to only run on agents which have the matching label.

If you're running inside Kubernetes, then you can use the kubernetes plugin to define the specific docker images to be used in the build.

If you're running the job on the master, then you'd need to create a Docker image derived from the base image you're using.

This question really belongs on the user list.  If the answers I've offered above are not sufficient, please raise the question on the Jenkins users mailing list.  More people are subscribed to it, more are likely to answer, and it avoids distracting the Jenkins Developer mailing list with questions that are not related to the development of Jenkins.

Thanks,
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b4efcf94-1b68-4049-894e-c7a15807c7a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks!
Mark Waite
Reply all
Reply to author
Forward
0 new messages