Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] binhex - Jenkins

Featured Replies

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.

  • 8 months later...

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 by phyzical

  • 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

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!

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

+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

  • 1 month later...

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:

5b4f0371f4.png

 

And finally I also passed the docker.sock to the container:

2367f624a0.png

 

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.

 

  • 3 months later...

@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

+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

quick update: pinned to binhex/arch-jenkins:2.242-1-01 and no issues with `libfreetype.so.6`

I am also having the libfreetype.so problem! I have also pinned to 2.242-1-01 with no issues.

  • 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.

  • 2 weeks later...

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 by rtm516

  • 1 year later...

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.

  • 1 month later...

Came here because of the same question/issue as @oko2708 and @nrgbistro.

 

Hope someone will help us!

  • 2 years later...

how can i fix "docker not found" in the pipeline?

  • 2 months later...

@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

 

image.png.ac3510b26b62351f98be3a8b6e9e808b.png

 

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.

 

image.png.bd04151ee50fe4f5c78edb6d39b1e473.png

 

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.