May 1, 20188 yr Ok, I think I follow! I wasn't aware that I could have 2 slaves in one Jenkins job, so I will look into this. I wholeheartedly agree that if I could do it all with Docker, I should, but unless something has changed, I don't believe I can. I am developing .Net applications which need the Windoze OS to compile and test, I believe? Incidentally, I am not wanting to create or delete the VM (which would, as you say, be slow), only start it up and shut it down. I don't want it to be left running 24x7, just fired up to do a build and then shut down again afterwards. Thank you once again for your support.
January 28, 20206 yr Hey there! Love the apps. This is my first time setting up a jenkins server and this is more of a general jenkins question so feel free to say sorry cant help but after a couple of days of googling and trying various things im just at a loss so i thought i would try here also, Im trying to add an ssh key via the credentials plugin, to checkout my private github repos for testing and ci deployments but no matter what i try it seems to think my private key is invalid. You wouldnt happen to know where the hell i enter the public key for a private key? as the plugin wants a username not the public key (i also tried my username for github juust incase). Ive seen many mentions of using an ssh agent but that just seem a weird way to go about it. Thanks in advance! edit: infact re-reading the responses in this thread am i actually supposed to have say a ubuntu vm running and use that as an agent rather than relying on the docker image as the agent? Edited January 28, 20206 yr by phyzical
January 28, 20206 yr Author 1 hour ago, phyzical said: Im trying to add an ssh key via the credentials plugin, to checkout my private github repos for testing and ci deployments but no matter what i try it seems to think my private key is invalid. You wouldnt happen to know where the hell i enter the public key for a private key? as the plugin wants a username not the public key (i also tried my username for github juust incase). Ive seen many mentions of using an ssh agent but that just seem a weird way to go about it. ive never used ssh key for access to github, i tend to use personal access tokens, which are then defined as a 'username with password' in jenkins, see link below for how to generate one if you want to go down that route:- https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
January 29, 20206 yr 18 hours ago, binhex said: ive never used ssh key for access to github, i tend to use personal access tokens, which are then defined as a 'username with password' in jenkins, see link below for how to generate one if you want to go down that route:- https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line hey thanks for the reply! unfortunately github is only 1 step for me, i then need to checkout a bitbucket repo for my common infrastructure (which access tokens may also work) and then i will need to be able to deploy to my host box so i will still need ssh keys to work guessing your normal usecase is just for testing and not deployment? i will keep tinkering and see if i can get it to work. worse case i suppose i can fall back to the vm solution for a build agent, just trying to avoid it if i can at this time. i will post back when i get to a solution incase it helps someone in the future. Thanks again!
February 1, 20206 yr just a followup incase anyone else runs into this. Jenkins supports private keys but there is nowhere to upload the public key, so what you need to do is either copy the private and public keys in question onto the container or just run Quote pacman -S openssh then generate an ssh key on the container, then upload that private key into jenkins
February 5, 20206 yr +1 to the suggestion for using docker plugin, can even just hook it up to the box running this container and it can dynamically spin up and kill docker containers per build. works great! thanks again @binhex
March 16, 20206 yr Hello, Thanks for maintaining this container, its working great so far. However, I did run into a problem and I'm sure I am just not understanding something correctly, but somehow I cannot get Jenkins to run a docker job. I have a very simple jenkinsfile: pipeline { agent { docker { image 'node:13-alpine' args '-p 3000:3000' } } stages { stage('Build') { steps { sh 'npm install' } } } } I have enabled the docker plugin for Jenkins and added a docker installation in the Global Tool Configuration: And finally I also passed the docker.sock to the container: However Jenkins build fail with "docker: command not found" What am I missing? I have been searching for an answer for a couple of hours now, but I can't find a solution.
July 5, 20206 yr @oko2708 i might have done it wrong but i got it working by exposing the docker port on my unraid box then configuring a cloud tcp://192.168.XX.XX:XXXX then i just create an cloud agent template this was also a bit annoying as the docker image then needed to apply the jlnp agent stuff i.e `FROM jenkins/jnlp-slave` if you figure out how to "just use docker images" let me know as it feels kinda iffy. @binhex i updated my image earlier today and then jenkis just died prompting something along the line of ` libfreetype.so.6: cannot open shared object file:` in JDK 8. is this just a jenkis issue? i assume your auto building based on tags in jenkins land or something. i just rolled back to 2.239 for now
July 10, 20205 yr +1 for the `libfreetype.so.6` error on the latest release. First two lines of the error received when accessing the web console below. AWT is not properly configured on this server. Perhaps you need to run your container with "-Djava.awt.headless=true"? See also: https://jenkins.io/redirect/troubleshooting/java.awt.headless java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory Tried adding `-Djava.awt.headless=true` as a java option and still no dice. This thread looked somewhat related: https://github.com/GoogleContainerTools/distroless/issues/321
July 10, 20205 yr quick update: pinned to binhex/arch-jenkins:2.242-1-01 and no issues with `libfreetype.so.6`
July 14, 20205 yr I am also having the libfreetype.so problem! I have also pinned to 2.242-1-01 with no issues.
July 20, 20205 yr Author On 7/14/2020 at 5:39 AM, Grifsworld said: I am also having the libfreetype.so problem! I have also pinned to 2.242-1-01 with no issues. fixed the image, a new image is now building, check for updates in an hour from now.
August 2, 20205 yr I was getting an error with this container after updating, about it missing a dir. chown: cannot access '/var/cache/jenkins': No such file or directory I ended up fixing it by adding this as a post argument, and I was wondering if this is caused by something strange on my install or an issue with the container. ; docker exec binhex-jenkins /bin/bash -c "mkdir /var/cache/jenkins" Edit: After some more usage it seems to be broken, these are my container settings any help would be appriciated. https://imgur.com/a/DiZN5vD (add me on discord if you want any more info @rtm516#2107) Edited August 3, 20205 yr by rtm516
December 21, 20214 yr I'm also having the same error as @oko2708. How do I properly set up docker in this Jenkins container? I've installed the docker and docker pipeline plugins, set up docker to automatically download in global tool configuration, and tried mapping the Unraid docker.sock to the container. I'm not really sure what else to try and I can't find any fix for this on the internet.
January 26, 20224 yr Came here because of the same question/issue as @oko2708 and @nrgbistro. Hope someone will help us!
December 27, 20241 yr @binhex I can't figure out how to get this to work with docker on the Unraid host. I've tried both the `/var/run/docker.sock` and by ip `192.168.10.20:2376`. Both methods seem to encounter permission issues. First I passed through `/var/run/docker.sock` to the container by adding it as a path. If I try to add a docker cloud as `unix:///var/run/docker.sock` I get permission denied So, I tried the other method based on previous replies in this thread. First I modified the `/boot/config/docker.cfg` file and added `DOCKER_OPS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2376"`. I then rebooted Unraid so it would start docker with this options. I then changed the setting to `tcp://192.168.10.20:2376` and get a connection refused. I am stumped on how to get this to work. I want Jenkins to build container images. Without it being connected to docker I don't think it can do that and it makes it useless to me...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.