Jenkins as a Continuous Integration tool is one of the longest active (if considering it's existence as Hudson) and commands a considerable market share.  As such, in considering migrating from Jenkins to Azure DevOps, we may have to consider dealing with a large amount of current Jenkinsfile projects upon which our users actively rely.

While In the long run, we will likely want to rewrite them to use native Azure DevOps yaml tasks, templates, variables and agent pools.  In the short term, we can use a simple method to run them inline in Azure DevOps with JenkinsFile Runner.

Running Locally

We can first try this on a local WSL instance or ubuntu host.

The first thing we will do is get jenkinsfile-runner:

builder@DESKTOP-JBA79RT:~/Workspaces/jfRunnerDemo$ wget https://github.com/jenkinsci/jenkinsfile-runner/releases/download/1.0-beta-29/jenkinsfile-runner-1.0-beta-29.zip
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/builder/.wget-hsts'. HSTS will be disabled.
--2021-07-12 06:45:38--  https://github.com/jenkinsci/jenkinsfile-runner/releases/download/1.0-beta-29/jenkinsfile-runner-1.0-beta-29.zip
Resolving github.com (github.com)... 140.82.112.3
Connecting to github.com (github.com)|140.82.112.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/122790633/c6c36780-cb02-11eb-8f8d-ed30c5f4897c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210712%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210712T114542Z&X-Amz-Expires=300&X-Amz-Signature=f50a8be824082bd339b5b679eabc5d436b26a54232a66d8e0ac0c81c8a750827&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=122790633&response-content-disposition=attachment%3B%20filename%3Djenkinsfile-runner-1.0-beta-29.zip&response-content-type=application%2Foctet-stream [following]
--2021-07-12 06:45:38--  https://github-releases.githubusercontent.com/122790633/c6c36780-cb02-11eb-8f8d-ed30c5f4897c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210712%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210712T114542Z&X-Amz-Expires=300&X-Amz-Signature=f50a8be824082bd339b5b679eabc5d436b26a54232a66d8e0ac0c81c8a750827&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=122790633&response-content-disposition=attachment%3B%20filename%3Djenkinsfile-runner-1.0-beta-29.zip&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.109.154, 185.199.110.154, 185.199.111.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.109.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1293049 (1.2M) [application/octet-stream]
Saving to: ‘jenkinsfile-runner-1.0-beta-29.zip’

jenkinsfile-runner-1 100%[======================>]   1.23M  --.-KB/s    in 0.1s

2021-07-12 06:45:38 (12.5 MB/s) - ‘jenkinsfile-runner-1.0-beta-29.zip’ saved [1293049/1293049]

Then unzip it

$ unzip jenkinsfile-runner-1.0-beta-29.zip
Archive:  jenkinsfile-runner-1.0-beta-29.zip
   creating: bin/
   creating: lib/
   creating: lib/payload/
   creating: lib/setup/
   creating: repo/
   creating: repo/com/
   creating: repo/com/github/
   creating: repo/com/github/spotbugs/
   creating: repo/com/github/spotbugs/spotbugs-annotations/
   creating: repo/com/github/spotbugs/spotbugs-annotations/4.2.3/
   creating: repo/com/google/
   creating: repo/com/google/code/
   creating: repo/com/google/code/findbugs/
   creating: repo/com/google/code/findbugs/jsr305/
   creating: repo/com/google/code/findbugs/jsr305/3.0.2/
   creating: repo/commons-collections/
   creating: repo/commons-collections/commons-collections/
   creating: repo/commons-collections/commons-collections/3.2.2/
   creating: repo/commons-io/
   creating: repo/commons-io/commons-io/
   creating: repo/commons-io/commons-io/2.8.0/
   creating: repo/info/
   creating: repo/info/picocli/
   creating: repo/info/picocli/picocli/
   creating: repo/info/picocli/picocli/4.6.1/
   creating: repo/io/
   creating: repo/io/jenkins/
   creating: repo/io/jenkins/jenkinsfile-runner/
   creating: repo/io/jenkins/jenkinsfile-runner/bootstrap/
   creating: repo/io/jenkins/jenkinsfile-runner/bootstrap/1.0-beta-29/
   creating: repo/io/jenkins/jenkinsfile-runner/jenkinsfile-runner/
   creating: repo/io/jenkins/jenkinsfile-runner/jenkinsfile-runner/1.0-beta-29/
   creating: repo/io/jenkins/lib/
   creating: repo/io/jenkins/lib/support-log-formatter/
   creating: repo/io/jenkins/lib/support-log-formatter/1.0/
   creating: repo/org/
   creating: repo/org/jenkins-ci/
   creating: repo/org/jenkins-ci/annotation-indexer/
   creating: repo/org/jenkins-ci/annotation-indexer/1.14/
   creating: repo/org/jenkins-ci/version-number/
   creating: repo/org/jenkins-ci/version-number/1.7/
  inflating: bin/jenkinsfile-runner
  inflating: bin/jenkinsfile-runner.bat
  inflating: lib/payload/payload.jar
  inflating: lib/setup/setup.jar
  inflating: repo/com/github/spotbugs/spotbugs-annotations/4.2.3/spotbugs-annotations-4.2.3.jar
  inflating: repo/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
  inflating: repo/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar
  inflating: repo/commons-io/commons-io/2.8.0/commons-io-2.8.0.jar
  inflating: repo/info/picocli/picocli/4.6.1/picocli-4.6.1.jar
  inflating: repo/io/jenkins/jenkinsfile-runner/bootstrap/1.0-beta-29/bootstrap-1.0-beta-29.jar
  inflating: repo/io/jenkins/jenkinsfile-runner/jenkinsfile-runner/1.0-beta-29/jenkinsfile-runner-1.0-beta-29.jar
  inflating: repo/io/jenkins/lib/support-log-formatter/1.0/support-log-formatter-1.0.jar
  inflating: repo/org/jenkins-ci/annotation-indexer/1.14/annotation-indexer-1.14.jar
  inflating: repo/org/jenkins-ci/version-number/1.7/version-number-1.7.jar

We can start with a simple helloworld pipeline:

$ cat helloworld/jenkinsfile
pipeline {
    agent any
    stages {
        stage('Print hello') {
            steps {
                echo 'Hello world!'
            }
        }
    }
}

Running with CLI

We can make a jenkinsfile and run it, but will find lots of errors due to missing plugins:

$ ./bin/jenkinsfile-runner -f ./helloworld/jenkinsfile
No explicit version has been selected, using latest LTS
Running pipeline on jenkins 2.289.2
Downloading jenkins 2.289.2...
Following redirect...
Exploding /home/builder/.jenkinsfile-runner/war/2.289.2/jenkins-war-2.289.2.war, this might take some time.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/home/builder/Workspaces/jfRunnerDemo/jenkinsfile-runner6651179021317639590/WEB-INF/lib/guice-4.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.RuntimeException: Unhandled exception
        at io.jenkins.jenkinsfile.runner.bootstrap.commands.JenkinsLauncherCommand.call(JenkinsLauncherCommand.java:70)
        at io.jenkins.jenkinsfile.runner.bootstrap.Bootstrap.call(Bootstrap.java:71)
        at io.jenkins.jenkinsfile.runner.bootstrap.Bootstrap.call(Bootstrap.java:21)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at io.jenkins.jenkinsfile.runner.bootstrap.Bootstrap.main(Bootstrap.java:46)
Caused by: java.lang.NoClassDefFoundError: com/cloudbees/plugins/credentials/CredentialsUnavailableException        at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
        at java.base/java.lang.Class.getMethodsRecursive(Class.java:3307)
        at java.base/java.lang.Class.getMethod0(Class.java:3293)
        at java.base/java.lang.Class.getMethod(Class.java:2106)
        at io.jenkins.jenkinsfile.runner.JenkinsfileRunnerLauncher.doLaunch(JenkinsfileRunnerLauncher.java:34)
        at io.jenkins.jenkinsfile.runner.JenkinsLauncher.launch(JenkinsLauncher.java:121)
        at io.jenkins.jenkinsfile.runner.App.run(App.java:32)
        at io.jenkins.jenkinsfile.runner.bootstrap.commands.JenkinsLauncherCommand.runJenkinsfileRunnerApp(JenkinsLauncherCommand.java:228)
        at io.jenkins.jenkinsfile.runner.bootstrap.commands.JenkinsLauncherCommand.call(JenkinsLauncherCommand.java:68)
        ... 10 more
Caused by: java.lang.ClassNotFoundException: com.cloudbees.plugins.credentials.CredentialsUnavailableException
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 20 more

You can try and fill the plugins folder manually and run things:

$ ./bin/jenkinsfile-runner -p /home/builder/Workspaces/jfRunnerDemo/plugins -f ./helloworld/jenkinsfile
No explicit version has been selected, using latest LTS
Running pipeline on jenkins 2.289.2
Exploding /home/builder/.jenkinsfile-runner/war/2.289.2/jenkins-war-2.289.2.war, this might take some time.
2021-07-12 12:15:11.266+0000 [id=28]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Credentials Plugin v2.5 (credentials)
java.io.IOException: Failed to load: Credentials Plugin (2.5)
 - Plugin is missing: structs (1.23)
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:963)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:550)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

You can also try downloading a specific jenkins war to run:

$ wget https://get.jenkins.io/war-stable/2.277.1/jenkins.war
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/builder/.wget-hsts'. HSTS will be disabled.
--2021-07-12 07:21:52--  https://get.jenkins.io/war-stable/2.277.1/jenkins.war
Resolving get.jenkins.io (get.jenkins.io)... 52.167.253.43
Connecting to get.jenkins.io (get.jenkins.io)|52.167.253.43|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://ftp-chi.osuosl.org/pub/jenkins/war-stable/2.277.1/jenkins.war [following]
--2021-07-12 07:21:53--  https://ftp-chi.osuosl.org/pub/jenkins/war-stable/2.277.1/jenkins.war
Resolving ftp-chi.osuosl.org (ftp-chi.osuosl.org)... 64.50.236.52, 2600:3402:200:227::2
Connecting to ftp-chi.osuosl.org (ftp-chi.osuosl.org)|64.50.236.52|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 70886703 (68M) [application/x-java-archive]
Saving to: ‘jenkins.war.1’

jenkins.war                         100%[=========================================================================>]  67.60M  3.50MB/s    in 19s

2021-07-12 07:22:12 (3.53 MB/s) - ‘jenkins.war’ saved [70886703/70886703]

$ ./bin/jenkinsfile-runner -w /home/builder/Workspaces/jfRunnerDemo/jenkins.war -p /home/builder/Workspaces/jfRunnerDemo/plugins -f ./helloworld/jenkinsfile
Exploding /home/builder/Workspaces/jfRunnerDemo/jenkins.war, this might take some time.
2021-07-12 12:25:15.437+0000 [id=29]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin SSH server v3.0.3 (sshd)
java.io.IOException: Failed to load: SSH server (3.0.3)
 - Jenkins (2.282) or higher required
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:950)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:550)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
2021-07-12 12:25:15.440+0000 [id=40]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Credentials Plugin v2.5 (credentials)
java.io.IOException: Failed to load: Credentials Plugin (2.5)
 - Plugin is missing: structs (1.23)

While the plugins directory should work, i gained more success with the plugins file approach:

$ ./bin/jenkinsfile-runner -p /home/builder/Workspaces/jfRunnerDemo/plugins.txt -f ./helloworld/jenkinsfile
No explicit version has been selected, using latest LTS
Running pipeline on jenkins 2.289.2
Exploding /home/builder/.jenkinsfile-runner/war/2.289.2/jenkins-war-2.289.2.war, this might take some time.
Downloading jenkins plugin ace-editor (latest)...
Downloading jenkins plugin ant (latest)...
Downloading jenkins plugin antisamy-markup-formatter (latest)...
Downloading jenkins plugin authentication-tokens (latest)...
Downloading jenkins plugin bouncycastle-api (latest)...
Downloading jenkins plugin branch-api (latest)...
Downloading jenkins plugin build-timeout (latest)...
Downloading jenkins plugin cloudbees-folder (latest)...
Downloading jenkins plugin credentials (latest)...
Downloading jenkins plugin credentials-binding (latest)...

Once I got it honed in with the right list of plugins, i was able to run successfully:

plugins.txt

ace-editor:latest
ant:latest
antisamy-markup-formatter:latest
apache-httpcomponents-client-4-api:latest
authentication-tokens:latest
block-queued-job:latest
bootstrap4-api:latest
bootstrap5-api:latest
bouncycastle-api:latest
branch-api:latest
build-timeout:latest
caffeine-api:latest
checks-api:latest
cloudbees-folder:latest
configuration-as-code:latest
credentials-binding:latest
credentials:latest
display-url-api:latest
docker-commons:latest
docker-workflow:latest
durable-task:latest
echarts-api:latest
email-ext:latest
external-monitor-job:latest
favorite:latest
font-awesome-api:latest
ghprb:latest
git-changelog:latest
git-client:latest
git-server:latest
git:latest
github-api:latest
github-branch-source:latest
github-issues:latest
github-oauth:latest
github-organization-folder:latest
github-pr-coverage-status:latest
github-pullrequest:latest
github:latest
gitlab-merge-request-jenkins:latest
gitlab-oauth:latest
gitlab-plugin:latest
google-login:latest
gradle:latest
gravatar:latest
groovy:latest
handlebars:latest
icon-shim:latest
jackson2-api:latest
javadoc:latest
jdk-tool:latest
jjwt-api:latest
jquery-detached:latest
jquery3-api:latest
jsch:latest
junit:latest
kerberos-sso:latest
ldap:latest
lockable-resources:latest
mailer:latest
mapdb-api:latest
matrix-auth:latest
matrix-project:latest
maven-plugin:latest
mercurial:latest
metrics:latest
momentjs:latest
oauth-credentials:latest
oic-auth:latest
okhttp-api:latest
openid4java:latest
openid:latest
openshift-login:latest
pam-auth:latest
pipeline-build-step:latest
pipeline-github-lib:latest
pipeline-githubnotify-step:latest
pipeline-graph-analysis:latest
pipeline-input-step:latest
pipeline-milestone-step:latest
pipeline-model-api:latest
pipeline-model-declarative-agent:latest
pipeline-model-definition:latest
pipeline-model-extensions:latest
pipeline-rest-api:latest
pipeline-stage-step:latest
pipeline-stage-tags-metadata:latest
pipeline-stage-view:latest
pipeline-utility-steps:latest
plain-credentials:latest
plugin-util-api:latest
popper-api:latest
popper2-api:latest
pubsub-light:latest
resource-disposer:latest
scm-api:latest
script-security:latest
snakeyaml-api:latest
sse-gateway:latest
ssh-agent:latest
ssh-credentials:latest
ssh-slaves:latest
sshd:latest
structs:latest
subversion:latest
timestamper:latest
token-macro:latest
trilead-api:latest
url-auth-sso:latest
variant:latest
windows-slaves:latest
workflow-aggregator:latest
workflow-api:latest
workflow-basic-steps:latest
workflow-cps-global-lib:latest
workflow-cps:latest
workflow-durable-task-step:latest
workflow-job:latest
workflow-multibranch:latest
workflow-scm-step:latest
workflow-step-api:latest
workflow-support:latest
ws-cleanup:latest

invokation

$ ./bin/jenkinsfile-runner -p /home/builder/Workspaces/jfRunnerDemo/plugins.txt -f ./helloworld/jenkinsfile
No explicit version has been selected, using latest LTS
Running pipeline on jenkins 2.289.2
Exploding /home/builder/.jenkinsfile-runner/war/2.289.2/jenkins-war-2.289.2.war, this might take some time.
Downloading jenkins plugin block-queued-job (latest)...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/home/builder/Workspaces/jfRunnerDemo/jenkinsfile-runner16629216856163048635/WEB-INF/lib/guice-4.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2021-07-13 11:35:59.114+0000 [id=39]    WARNING o.o.server.RealmVerifier#setEnforceRpId: RP discovery / realm validation disabled;
Started
Resume disabled by user, switching to high-performance, low-durability mode.
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /tmp/jenkinsfileRunner.tmp/jfr2151296665825835802.run/workspace/job
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Print hello)
[Pipeline] echo
Hello world!
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

Containerized

We can also run as a container

$ docker run --rm -v $(pwd)/helloworld/jenkinsfile:/workspace/Jenkinsfile jenkins/jenkinsfile-runner
2021-07-12 12:54:35.479+0000 [id=31]    WARNING hudson.ExtensionFinder$Sezpoz#scout: Failed to scout org.jenkinsci.plugins.gitserver.ssh.SshCommandFactoryImpl
java.lang.ClassNotFoundException: org.jenkinsci.main.modules.sshd.SshCommandFactory
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/main/modules/sshd/SshCommandFactory
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1159)
        at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:718)
        at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1330)
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1382)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:107)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2163)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
Caused: java.lang.InstantiationException
        at net.java.sezpoz.IndexItem.element(IndexItem.java:146)
        at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:738)
        at hudson.ExtensionFinder.access$900(ExtensionFinder.java:88)
        at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:723)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:342)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.getComponents(ExtensionList.java:182)
        at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1159)
        at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-12 12:54:35.785+0000 [id=31]    WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load org.jenkinsci.plugins.gitserver.ssh.SshCommandFactoryImpl
java.lang.ClassNotFoundException: org.jenkinsci.main.modules.sshd.SshCommandFactory
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/main/modules/sshd/SshCommandFactory
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1159)
        at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:718)
        at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1330)
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1382)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:107)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2163)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
Caused: java.lang.InstantiationException
        at net.java.sezpoz.IndexItem.element(IndexItem.java:146)
        at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:738)
        at hudson.ExtensionFinder.access$900(ExtensionFinder.java:88)
        at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:698)
        at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:687)
        at hudson.ExtensionFinder$GuiceFinder.refreshExtensionAnnotations(ExtensionFinder.java:301)
        at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:263)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
        at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:701)
        at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:687)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.getComponents(ExtensionList.java:182)
        at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1159)
        at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-12 12:54:35.832+0000 [id=31]    WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load org.jenkinsci.plugins.gitserver.ssh.SshCommandFactoryImpl
java.lang.ClassNotFoundException: org.jenkinsci.main.modules.sshd.SshCommandFactory
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/main/modules/sshd/SshCommandFactory
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1159)
        at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:718)
        at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1330)
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1382)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:107)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2163)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
Caused: java.lang.InstantiationException
        at net.java.sezpoz.IndexItem.element(IndexItem.java:146)
        at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:738)
        at hudson.ExtensionFinder.access$900(ExtensionFinder.java:88)
        at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:698)
        at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:687)
        at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:278)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
        at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:701)
        at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:687)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.getComponents(ExtensionList.java:182)
        at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1159)
        at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-12 12:54:36.142+0000 [id=31]    WARNING h.ExtensionFinder$GuiceFinder$SezpozModule#configure: Failed to load org.jenkinsci.plugins.gitserver.ssh.SshCommandFactoryImpl
java.lang.ClassNotFoundException: org.jenkinsci.main.modules.sshd.SshCommandFactory
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/main/modules/sshd/SshCommandFactory
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1159)
        at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:718)
        at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1330)
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1382)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:107)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2163)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
Caused: java.lang.InstantiationException
        at net.java.sezpoz.IndexItem.element(IndexItem.java:146)
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:516)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements.getElements(Elements.java:110)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        at com.google.inject.Guice.createInjector(Guice.java:96)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:283)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
        at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:701)
        at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:687)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.getComponents(ExtensionList.java:182)
        at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1159)
        at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-12 12:54:37.763+0000 [id=31]    WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load org.jenkinsci.plugins.gitserver.ssh.SshCommandFactoryImpl
java.lang.ClassNotFoundException: org.jenkinsci.main.modules.sshd.SshCommandFactory
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/main/modules/sshd/SshCommandFactory
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1159)
        at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:718)
        at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1330)
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1382)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:107)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2163)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
Caused: java.lang.InstantiationException
        at net.java.sezpoz.IndexItem.element(IndexItem.java:146)
        at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:738)
        at hudson.ExtensionFinder.access$900(ExtensionFinder.java:88)
        at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:698)
        at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:687)
        at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:348)
        at hudson.ExtensionList.load(ExtensionList.java:380)
        at hudson.ExtensionList.ensureLoaded(ExtensionList.java:316)
        at hudson.ExtensionList.getComponents(ExtensionList.java:182)
        at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1159)
        at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
        at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
        at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-12 12:54:39.362+0000 [id=1]     WARNING j.branch.WorkspaceLocatorImpl#getWorkspaceRoot: JENKINS-2111 path sanitization ineffective when using legacy Workspace Root Directory ‘/build’; switch to ‘${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}’ as in JENKINS-8446 / JENKINS-21942
Started
Resume disabled by user, switching to high-performance, low-durability mode.
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /build
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Print hello)
[Pipeline] echo
Hello world!
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

We can see at the end that it did run, however all the missing plugins were quite noisy.

We can try and map the plugins dir, but will get the same results

$ docker run --rm -v $(pwd)/helloworld/jenkinsfile:/workspace/Jenkinsfile -v /home/builder/Workspaces/jfRunnerDemo/plugins.txt:/jenkinsHome/plugins.txt -v /home/builder/Workspaces/jfRunnerDemo/plugins:/usr/share/jenkins/ref/plugins jenkins/jenkinsfile-runner
2021-07-13 12:14:12.285+0000 [id=32]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Jenkins Parameterized Trigger plugin v2.41 (parameterized-trigger)
java.io.IOException: Failed to load: Jenkins Parameterized Trigger plugin (2.41)
 - Plugin is missing: conditional-buildstep (1.4.1)
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:963)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:550)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-13 12:14:12.288+0000 [id=31]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Delivery Pipeline Plugin v1.3.2 (delivery-pipeline-plugin)
java.io.IOException: Failed to load: Delivery Pipeline Plugin (1.3.2)
 - Failed to load: Jenkins Parameterized Trigger plugin (2.41)
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:963)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:550)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-13 12:14:12.500+0000 [id=26]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Jenkins JClouds plugin v2.23 (jclouds-jenkins)
java.io.IOException: Failed to load: Jenkins JClouds plugin (2.23)
 - Update required: JAXB plugin (2.3.0) to be updated to 2.3.0.1 or higher
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:963)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:550)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1129)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-13 12:14:18.454+0000 [id=31]    WARNING o.o.server.RealmVerifier#setEnforceRpId: RP discovery / realm validation disabled;
2021-07-13 12:14:19.463+0000 [id=1]     WARNING j.branch.WorkspaceLocatorImpl#getWorkspaceRoot: JENKINS-2111 path sanitization ineffective when using legacy Workspace Root Directory ‘/build’; switch to ‘${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}’ as in JENKINS-8446 / JENKINS-21942
Started
Resume disabled by user, switching to high-performance, low-durability mode.
[Pipeline] Start of Pipeline
2021-07-13 12:14:24.012+0000 [id=67]    WARNING o.j.h.a.Index$2$1#fetch: Failed to load org.jenkinsci.plugins.github.pullrequest.extra.GitHubPRLabelUnblockQueueCondition$DescriptorImpl
java.lang.ClassNotFoundException: org.jenkinsci.plugins.blockqueuedjob.condition.BlockQueueCondition$BlockQueueConditionDescriptor
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/blockqueuedjob/condition/BlockQueueCondition$BlockQueueConditionDescriptor
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1159)
        at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:718)
        at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1330)
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1382)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:107)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2163)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at org.jvnet.hudson.annotation_indexer.Index$2$1.fetch(Index.java:113)
        at org.jvnet.hudson.annotation_indexer.Index$2$1.hasNext(Index.java:82)
        at org.jvnet.hudson.annotation_indexer.SubtypeIterator.fetch(SubtypeIterator.java:18)
        at org.jvnet.hudson.annotation_indexer.SubtypeIterator.hasNext(SubtypeIterator.java:28)
        at org.jenkinsci.plugins.structs.SymbolLookup.findDescriptor(SymbolLookup.java:143)
        at org.jenkinsci.plugins.pipeline.modeldefinition.agent.DeclarativeAgentDescriptor.byName(DeclarativeAgentDescriptor.java:121)
        at org.jenkinsci.plugins.pipeline.modeldefinition.agent.DeclarativeAgentDescriptor$byName$1.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        at org.jenkinsci.plugins.pipeline.modeldefinition.model.Agent.getDeclarativeAgent(Agent.groovy:84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:20)
        at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
        at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39)
        at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
        at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28)
        at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55)
        at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16)
        at com.cloudbees.groovy.cps.Next.step(Next.java:83)
        at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
        at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
        at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
        at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
        at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
        at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
        at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
        at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
        at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
        at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
2021-07-13 12:14:24.357+0000 [id=58]    WARNING o.j.h.a.Index$2$1#fetch: Failed to load org.jenkinsci.plugins.github.pullrequest.extra.GitHubPRLabelUnblockQueueCondition$DescriptorImpl
java.lang.ClassNotFoundException: org.jenkinsci.plugins.blockqueuedjob.condition.BlockQueueCondition$BlockQueueConditionDescriptor
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1392)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1093)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/blockqueuedjob/condition/BlockQueueCondition$BlockQueueConditionDescriptor
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1159)
        at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:718)
        at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1330)
        at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1382)
        at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1347)
        at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:107)
        at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2163)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at org.jvnet.hudson.annotation_indexer.Index$2$1.fetch(Index.java:113)
        at org.jvnet.hudson.annotation_indexer.Index$2$1.hasNext(Index.java:82)
        at org.jvnet.hudson.annotation_indexer.SubtypeIterator.fetch(SubtypeIterator.java:18)
        at org.jvnet.hudson.annotation_indexer.SubtypeIterator.hasNext(SubtypeIterator.java:28)
        at org.jenkinsci.plugins.structs.SymbolLookup.findDescriptor(SymbolLookup.java:143)
        at org.jenkinsci.plugins.pipeline.modeldefinition.agent.DeclarativeAgentDescriptor.byName(DeclarativeAgentDescriptor.java:121)
        at org.jenkinsci.plugins.pipeline.modeldefinition.agent.DeclarativeAgentDescriptor.instanceForName(DeclarativeAgentDescriptor.java:134)
        at org.jenkinsci.plugins.pipeline.modeldefinition.agent.DeclarativeAgentDescriptor$instanceForName$3.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:20)
        at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
        at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
        at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
        at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
        at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
        at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
        at com.cloudbees.groovy.cps.Next.step(Next.java:83)
        at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
        at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
        at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
        at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
        at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
        at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
        at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
        at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
        at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
        at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
        at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
        at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
[Pipeline] node
Running on Jenkins in /build
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Print hello)
[Pipeline] echo
Hello world!
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

The reason is that the docker image itself maps just a plugins dir, not file.  So it makes it rather hard to mimic the CLI unless we wish to rebuild the container

Rebuilding the Container

We'll pull from the jenkins-file runner GH repo: https://github.com/jenkinsci/jenkinsfile-runner/

$ git clone https://github.com/jenkinsci/jenkinsfile-runner.git
Cloning into 'jenkinsfile-runner'...
remote: Enumerating objects: 5518, done.
remote: Counting objects: 100% (570/570), done.
remote: Compressing objects: 100% (276/276), done.
remote: Total 5518 (delta 228), reused 505 (delta 183), pack-reused 4948
Receiving objects: 100% (5518/5518), 1.54 MiB | 10.52 MiB/s, done.
Resolving deltas: 100% (2276/2276), done.

$ cd jenkinsfile-runner

Next we will build the container as it stands

$ docker build -t jenkins4eval/jenkinsfile-runner -f packaging/docker/unix/adoptopenjdk-8-hotspot/Dockerfile .
[+] Building 73.7s (7/29)
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                                                  0.0s
 => => transferring dockerfile: 2.60kB                                                                                                                                                                                                                                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                     0.0s
 => => transferring context: 700B                                                                                                                                                                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot                                                                                                                                                                                                                                                                18.5s
 => [internal] load metadata for docker.io/jenkins/jenkinsfile-runner:build-mvncache                                                                                                                                                                                                                                                                 24.7s
 => [internal] load metadata for docker.io/library/maven:3.6.3-adoptopenjdk-8                                                                                                                                                                                                                                                                        18.7s
 => [stage-2 1/7] FROM docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot@sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52                                                                                                                                                                                                   0.8s
 => => resolve docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot@sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52                                                                                                                                                                                                           0.1s
 => => sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52 1.70kB / 1.70kB                                                                                                                                                                                                                                                        0.0s
 => => sha256:dc1a916ef34e2d83ec21526b806a4a73979b92b08454303f8ad2e4ff5e4e0248 1.37kB / 1.37kB                                                                                                                                                                                                                                                        0.0s
 => => sha256:07d6cf4b7959fcd33e1112d442f76adf56c06bb39342c42616846d7c93074b00 6.57kB / 6.57kB                                                                                                                                                                                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                                                                                                                                                                     1.1s
 => => transferring context: 209.95kB                                                                                                                                                                                                                                                                                                                 0.9s
 => [jenkinsfilerunner-mvncache 1/1] FROM docker.io/jenkins/jenkinsfile-runner:build-mvncache@sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1                                                                                                                                                                                48.7s
 => => resolve docker.io/jenkins/jenkinsfile-runner:build-mvncache@sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1                                                                                                                                                                                                            0.1s
 => => sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1 3.47kB / 3.47kB                                                                                                                                                                                                                                                        0.0s
 => => sha256:d4c069396c9cf566a41538f82c177120d623d6a7e02c352828c12856b5e19edc 8.66kB / 8.66kB                                                                                                                                                                                                                                                        0.0s
 => => sha256:bc9ab73e5b14b9fbd3687a4d8c1f1360533d6ee9ffc3f5ecc6630794b40257b7 45.31MB / 45.31MB                                                                                                                                                                                                                                                     11.0s
 => => sha256:193a6306c92af328dbd41bbbd3200a2c90802624cccfe5725223324428110d7f 10.74MB / 10.74MB                                                                                                                                                                                                                                                      2.2s
 => => sha256:e5c3f8c317dc30af45021092a3d76f16ba7aa1ee5f18fec742c84d4960818580 4.34MB / 4.34MB                                                                                                                                                                                                                                                        1.4s
 => => sha256:a587a86c9dcb9df6584180042becf21e36ecd8b460a761711227b4b06889a005 50.07MB / 50.07MB                                                                                                                                                                                                                                                     12.9s
 => => sha256:a4c7ee7ef122c78bdcb4087b1245788dfee5b7d7d796b8310bc75e5d02c4c067 892.34kB / 892.34kB                                                                                                                                                                                                                                                    2.6s
 => => sha256:a7c0dad691e9a2190a036b437280130e383481f0e0d5e4516a0d14de690ee0eb 249B / 249B                                                                                                                                                                                                                                                            2.8s
 => => sha256:367a6a68b113cde265568261ba36f477c49ff982418a561fb85d9730b5aac9a3 131B / 131B                                                                                                                                                                                                                                                            3.0s
 => => sha256:60c0e52d1ec297a9ade35f6b17bcf69d959bb1f16c506290f29af5513b0cdabd 133.97MB / 133.97MB                                                                                                                                                                                                                                                   24.3s
 => => sha256:c9d22bc4393511e7d49d7bb83b5b2dcc95cde66f54a69099421c65928e873e9c 246.72kB / 246.72kB                                                                                                                                                                                                                                                   11.3s
 => => extracting sha256:bc9ab73e5b14b9fbd3687a4d8c1f1360533d6ee9ffc3f5ecc6630794b40257b7                                                                                                                                                                                                                                                             4.1s
 => => sha256:41dbcd9705033adccc6f97615dce0e459aa2d7985ff90de5185b52b26450650a 8.99MB / 8.99MB                                                                                                                                                                                                                                                       13.0s
 => => sha256:72c52bb7e9b706821eabaa08e9be113a220c23a20f8c8ea9de1d3d89ff355c1a 752B / 752B                                                                                                                                                                                                                                                           13.2s
 => => sha256:275d6d4a835db8c7040deff5b67e50a753d64d431d3d0ab04b803d68bcadd11c 360B / 360B                                                                                                                                                                                                                                                           13.3s
 => => sha256:94ce9d931ca5096d5549182e673c7a109d345273aac1c1d6dc41ed77f2b84323 1.77MB / 1.77MB                                                                                                                                                                                                                                                       14.6s
 => => sha256:94eb778976cfea4ce84a3dfe82ee9703b3835cb2b5f05b602dfb06f43d961347 92B / 92B                                                                                                                                                                                                                                                             13.8s
 => => sha256:dd319732b9b0b75f74df9ddcb019604f132fa9c383140346fd8495bd83c136c7 301.99MB / 780.13MB                                                                                                                                                                                                                                                   48.6s
 => => extracting sha256:193a6306c92af328dbd41bbbd3200a2c90802624cccfe5725223324428110d7f                                                                                                                                                                                                                                                             0.8s
 => => extracting sha256:e5c3f8c317dc30af45021092a3d76f16ba7aa1ee5f18fec742c84d4960818580                                                                                                                                                                                                                                                             0.4s
 => => extracting sha256:a587a86c9dcb9df6584180042becf21e36ecd8b460a761711227b4b06889a005                                                                                                                                                                                                                                                             5.1s
 => => extracting sha256:a4c7ee7ef122c78bdcb4087b1245788dfee5b7d7d796b8310bc75e5d02c4c067                                                                                                                           [+] Building 73.8s (7/29)                                                                                                                                                                                           
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                                                  0.0s
 => => transferring dockerfile: 2.60kB                                                                                                                                                                                                                                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                     0.0s
 => => transferring context: 700B                                                                                                                                                                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot                                                                                                                                                                                                                                                                18.5s
 => [internal] load metadata for docker.io/jenkins/jenkinsfile-runner:build-mvncache                                                                                                                                                                                                                                                                 24.7s
 => [internal] load metadata for docker.io/library/maven:3.6.3-adoptopenjdk-8                                                                                                                                                                                                                                                                        18.7s
 => [stage-2 1/7] FROM docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot@sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52                                                                                                                                                                                                   0.8s
 => => resolve docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot@sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52                                                                                                                                                                                                           0.1s583e3bdf724732fbd4efa63
 => => sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52 1.70kB / 1.70kB                                                                                                                                                                                                                                                        0.0s
 => => sha256:dc1a916ef34e2d83ec21526b806a4a73979b92b08454303f8ad2e4ff5e4e0248 1.37kB / 1.37kB                                                                                                                                                                                                                                                        0.0s
 => => sha256:07d6cf4b7959fcd33e1112d442f76adf56c06bb39342c42616846d7c93074b00 6.57kB / 6.57kB                                                                                                                                                                                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                                                                                                                                                                     1.1s
 => => transferring context: 209.95kB                                                                                                                                                                                                                                                                                                                 0.9s
 => [jenkinsfilerunner-mvncache 1/1] FROM docker.io/jenkins/jenkinsfile-runner:build-mvncache@sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1                                                                                                                                                                                48.8s
 => => resolve docker.io/jenkins/jenkinsfile-runner:build-mvncache@sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1                                                                                                                                                                                                            0.1s
 => => sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1 3.47kB / 3.47kB                                                                                                                                                                                                                                                        0.0s
 => => sha256:d4c069396c9cf566a41538f82c177120d623d6a7e02c352828c12856b5e19edc 8.66kB / 8.66kB                                                                                                                                                                                                                                                        0.0s
 => => sha256:bc9ab73e5b14b9fbd3687a4d8c1f1360533d6ee9ffc3f5ecc6630794b40257b7 45.31MB / 45.31MB                                                                                                                                                                                                                                                     11.0s
 => => sha256:193a6306c92af328dbd41bbbd3200a2c90802624cccfe5725223324428110d7f 10.74MB / 10.74MB                                                                                                                                                                                                                                                      2.2s
 => => sha256:e5c3f8c317dc30af45021092a3d76f16ba7aa1ee5f18fec742c84d4960818580 4.34MB / 4.34MB                                                                                                                                                                                                                                                        1.4s
 => => sha256:a587a86c9dcb9df6584180042becf21e36ecd8b460a761711227b4b06889a005 50.07MB / 50.07MB                                                                                                                                                                                                                                                     12.9s
 => => sha256:a4c7ee7ef122c78bdcb4087b1245788dfee5b7d7d796b8310bc75e5d02c4c067 892.34kB / 892.34kB                                                                                                                                                                                                                                                    2.6s
 => => sha256:a7c0dad691e9a2190a036b437280130e383481f0e0d5e4516a0d14de690ee0eb 249B / 249B                                                                                                                                                                                                                                                            2.8s
 => => sha256:367a6a68b113cde265568261ba36f477c49ff982418a561fb85d9730b5aac9a3 131B / 131B                                                                                                                                                                                                                                                            3.0s
 => => sha256:60c0e52d1ec297a9ade35f6b17bcf69d959bb1f16c506290f29af5513b0cdabd 133.97MB / 133.97MB                                                                                                                                                                                                                                                   24.3s
 => => sha256:c9d22bc4393511e7d49d7bb83b5b2dcc95cde66f54a69099421c65928e873e9c 246.72kB / 246.72kB                                                                                                                                                                                                                                                   11.3s
 => => extracting sha256:bc9ab73e5b14b9fbd3687a4d8c1f1360533d6ee9ffc3f5ecc6630794b40257b7                                                                                                                                                                                                                                                             4.1s
 => => sha256:41dbcd9705033adccc6f97615dce0e459aa2d7985ff90de5185b52b26450650a 8.99MB / 8.99MB                                                                                                                                                                                                                                                       13.0s
 => => sha256:72c52bb7e9b706821eabaa08e9be113a220c23a20f8c8ea9de1d3d89ff355c1a 752B / 752B                                                                                                                                                                                                                                                           13.2s
 => => sha256:275d6d4a835db8c7040deff5b67e50a753d64d431d3d0ab04b803d68bcadd11c 360B / 360B                                                                                                                                                                                                                                                           13.3s
 => => sha256:94ce9d931ca5096d5549182e673c7a109d345273aac1c1d6dc41ed77f2b84323 1.77MB / 1.77MB                                                                                                                                                                                                                                                       14.6s
 => => sha256:94eb778976cfea4ce84a3dfe82ee9703b3835cb2b5f05b602dfb06f43d961347 92B / 92B                                                                                                                                                                                                                                                             13.8s
 => => sha256:dd319732b9b0b75f74df9ddcb019604f132fa9c383140346fd8495bd83c136c7 303.04MB / 780.13MB                                                                                                                                                                                                                                                   48.7s
 => => extracting sha256:193a6306c92af328dbd41bbbd3200a2c90802624cccfe5725223324428110d7f                                                                                                                                                                                                                                                             0.8s
 => => extracting sha256:e5c3f8c317dc30af45021092a3d76f16ba7aa1ee5f18fec742c84d4960818580                                                                                                                                                                                                                                                             0.4s
 => => extracting sha256:a587a86c9dcb9df6584180042becf21e36ecd8b460a761711227b4b06889a005                                                                                                                                                                                                                                                             5.1s
 => => extracting sha256:a4c7ee7ef122c78bdcb4087b1245788dfee5b7d7d796b8310bc75e5d02c4c067                                                                                                                           [+] Building 73.9s (7/29)
 => [internal] load metadata for docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot                                                                                                                         18.5s
 => [internal] load metadata for docker.io/jenkins/jenkinsfile-runner:build-mvncache                                                                                                                          24.7s
 => [internal] load metadata for docker.io/library/maven:3.6.3-adoptopenjdk-8                                                                                                                                 18.7s
[+] Building 461.8s (30/30) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                           0.0s
 => => transferring dockerfile: 2.60kB                                                                                                                                                                         0.0s
 => [internal] load .dockerignore                                                                                                                                                                              0.0s
 => => transferring context: 700B                                                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot                                                                                                                         18.5s
 => [internal] load metadata for docker.io/jenkins/jenkinsfile-runner:build-mvncache                                                                                                                          24.7s
 => [internal] load metadata for docker.io/library/maven:3.6.3-adoptopenjdk-8                                                                                                                                 18.7s
 => [stage-2 1/7] FROM docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot@sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52                                                            0.8s
 => => resolve docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot@sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52                                                                    0.1s
 => => sha256:7f3c8ef7e1e6af4df9652baf56284d19efb4255fd59156d7ae7c287d46bf8a52 1.70kB / 1.70kB                                                                                                                 0.0s
 => => sha256:dc1a916ef34e2d83ec21526b806a4a73979b92b08454303f8ad2e4ff5e4e0248 1.37kB / 1.37kB                                                                                                                 0.0s
 => => sha256:07d6cf4b7959fcd33e1112d442f76adf56c06bb39342c42616846d7c93074b00 6.57kB / 6.57kB                                                                                                                 0.0s
 => [internal] load build context                                                                                                                                                                              1.1s
 => => transferring context: 209.95kB                                                                                                                                                                          0.9s
 => [jenkinsfilerunner-mvncache 1/1] FROM docker.io/jenkins/jenkinsfile-runner:build-mvncache@sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1                                        104.2s
 => => resolve docker.io/jenkins/jenkinsfile-runner:build-mvncache@sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1                                                                     0.1s
 => => sha256:3f90760a2f9309ea7705579355e1a13f2d832577dfb9ada1b9f3f3b1e9783cd1 3.47kB / 3.47kB                                                                                                                 0.0s
 => => sha256:d4c069396c9cf566a41538f82c177120d623d6a7e02c352828c12856b5e19edc 8.66kB / 8.66kB                                                                                                                 0.0s
 => => sha256:bc9ab73e5b14b9fbd3687a4d8c1f1360533d6ee9ffc3f5ecc6630794b40257b7 45.31MB / 45.31MB                                                                                                              11.0s
 => => sha256:193a6306c92af328dbd41bbbd3200a2c90802624cccfe5725223324428110d7f 10.74MB / 10.74MB                                                                                                               2.2s
 => => sha256:e5c3f8c317dc30af45021092a3d76f16ba7aa1ee5f18fec742c84d4960818580 4.34MB / 4.34MB                                                                                                                 1.4s
 => => sha256:a587a86c9dcb9df6584180042becf21e36ecd8b460a761711227b4b06889a005 50.07MB / 50.07MB                                                                                                              12.9s
 => => sha256:a4c7ee7ef122c78bdcb4087b1245788dfee5b7d7d796b8310bc75e5d02c4c067 892.34kB / 892.34kB                                                                                                             2.6s
 => => sha256:a7c0dad691e9a2190a036b437280130e383481f0e0d5e4516a0d14de690ee0eb 249B / 249B                                                                                                                     2.8s
 => => sha256:367a6a68b113cde265568261ba36f477c49ff982418a561fb85d9730b5aac9a3 131B / 131B                                                                                                                     3.0s
 => => sha256:60c0e52d1ec297a9ade35f6b17bcf69d959bb1f16c506290f29af5513b0cdabd 133.97MB / 133.97MB                                                                                                            24.3s
 => => sha256:c9d22bc4393511e7d49d7bb83b5b2dcc95cde66f54a69099421c65928e873e9c 246.72kB / 246.72kB                                                                                                            11.3s
 => => extracting sha256:bc9ab73e5b14b9fbd3687a4d8c1f1360533d6ee9ffc3f5ecc6630794b40257b7                                                                                                                      4.1s
 => => sha256:41dbcd9705033adccc6f97615dce0e459aa2d7985ff90de5185b52b26450650a 8.99MB / 8.99MB                                                                                                                13.0s
 => => sha256:72c52bb7e9b706821eabaa08e9be113a220c23a20f8c8ea9de1d3d89ff355c1a 752B / 752B                                                                                                                    13.2s
 => => sha256:275d6d4a835db8c7040deff5b67e50a753d64d431d3d0ab04b803d68bcadd11c 360B / 360B                                                                                                                    13.3s
 => => sha256:94ce9d931ca5096d5549182e673c7a109d345273aac1c1d6dc41ed77f2b84323 1.77MB / 1.77MB                                                                                                                14.6s
 => => sha256:94eb778976cfea4ce84a3dfe82ee9703b3835cb2b5f05b602dfb06f43d961347 92B / 92B                                                                                                                      13.8s
 => => sha256:dd319732b9b0b75f74df9ddcb019604f132fa9c383140346fd8495bd83c136c7 780.13MB / 780.13MB                                                                                                            87.9s
 => => extracting sha256:193a6306c92af328dbd41bbbd3200a2c90802624cccfe5725223324428110d7f                                                                                                                      0.8s
 => => extracting sha256:e5c3f8c317dc30af45021092a3d76f16ba7aa1ee5f18fec742c84d4960818580                                                                                                                      0.4s
 => => extracting sha256:a587a86c9dcb9df6584180042becf21e36ecd8b460a761711227b4b06889a005                                                                                                                      5.1s
 => => extracting sha256:a4c7ee7ef122c78bdcb4087b1245788dfee5b7d7d796b8310bc75e5d02c4c067                                                                                                                      0.2s
 => => extracting sha256:a7c0dad691e9a2190a036b437280130e383481f0e0d5e4516a0d14de690ee0eb                                                                                                                      0.0s
 => => extracting sha256:367a6a68b113cde265568261ba36f477c49ff982418a561fb85d9730b5aac9a3                                                                                                                      0.0s
 => => extracting sha256:60c0e52d1ec297a9ade35f6b17bcf69d959bb1f16c506290f29af5513b0cdabd                                                                                                                     11.0s
 => => extracting sha256:c9d22bc4393511e7d49d7bb83b5b2dcc95cde66f54a69099421c65928e873e9c                                                                                                                      0.1s
 => => extracting sha256:41dbcd9705033adccc6f97615dce0e459aa2d7985ff90de5185b52b26450650a                                                                                                                      0.4s
 => => extracting sha256:72c52bb7e9b706821eabaa08e9be113a220c23a20f8c8ea9de1d3d89ff355c1a                                                                                                                      0.0s
 => => extracting sha256:275d6d4a835db8c7040deff5b67e50a753d64d431d3d0ab04b803d68bcadd11c                                                                                                                      0.0s
 => => extracting sha256:94eb778976cfea4ce84a3dfe82ee9703b3835cb2b5f05b602dfb06f43d961347                                                                                                                      0.0s
 => => extracting sha256:94ce9d931ca5096d5549182e673c7a109d345273aac1c1d6dc41ed77f2b84323                                                                                                                      0.2s
 => => extracting sha256:dd319732b9b0b75f74df9ddcb019604f132fa9c383140346fd8495bd83c136c7                                                                                                                     14.7s
 => [jenkinsfilerunner-build  1/15] FROM docker.io/library/maven:3.6.3-adoptopenjdk-8@sha256:5209400c985a904e176fb275f0ee7702fdcf065ce583e3bdf724732fbd4efa63                                                 64.4s
 => => resolve docker.io/library/maven:3.6.3-adoptopenjdk-8@sha256:5209400c985a904e176fb275f0ee7702fdcf065ce583e3bdf724732fbd4efa63                                                                            0.1s
 => => sha256:43c7973d4e83ebd2e123b6157f6532af82348e56b77d9d5a1ef65334ab580790 2.21kB / 2.21kB                                                                                                                 0.0s
 => => sha256:7f57a2e313530e2cc6be3ea0ab717cf7c59715e0516c082242755748fcfe9b43 9.43kB / 9.43kB                                                                                                                 0.0s
 => => sha256:5209400c985a904e176fb275f0ee7702fdcf065ce583e3bdf724732fbd4efa63 750B / 750B                                                                                                                     0.0s
 => => sha256:04a5f4cda3eea2313a61a2f72208342a57ea36a9326dff54f4f26ed47d145c7c 28.57MB / 28.57MB                                                                                                              20.4s
 => => sha256:ff496a88c8ed9b745dab2f00bfbd9013c6d1db198442a6a8683998a29a85458a 846B / 846B                                                                                                                    30.7s
 => => extracting sha256:04a5f4cda3eea2313a61a2f72208342a57ea36a9326dff54f4f26ed47d145c7c                                                                                                                      2.8s
 => => sha256:0ce83f459fe7e0bf459d0c222ef3b2ca4d9911f6b0f9aae02c2120561b54ca18 189B / 189B                                                                                                                    30.8s
 => => extracting sha256:ff496a88c8ed9b745dab2f00bfbd9013c6d1db198442a6a8683998a29a85458a                                                                                                                      0.0s
 => => sha256:a6315e58a4fe1441064bfd504990b519f51bf9e2c0318a7b2f7f18c6dc8c0812 16.03MB / 16.03MB                                                                                                              33.9s
 => => sha256:95544a631453a086b2ce2748d5e2baf9e753a84324e868d45be42c91f339308b 103.40MB / 103.40MB                                                                                                            50.9s
 => => extracting sha256:0ce83f459fe7e0bf459d0c222ef3b2ca4d9911f6b0f9aae02c2120561b54ca18                                                                                                                      0.0s
 => => sha256:1e8721914c900626229a8dec4f5c6627771a75b23bcd3472659024c46ed50b50 31.17MB / 31.17MB                                                                                                              40.4s
 => => extracting sha256:a6315e58a4fe1441064bfd504990b519f51bf9e2c0318a7b2f7f18c6dc8c0812                                                                                                                      1.9s
 => => sha256:ef4162f8e00399eaed25c9405a957ef3630428ce5c82bf5979505829f0131848 9.58MB / 9.58MB                                                                                                                42.9s
 => => sha256:a1e9706f1a03d5b1ec5812818eab1e3dfb71665a635e410d58c4fb75d06d26e0 850B / 850B                                                                                                                    43.1s
 => => sha256:80e142e980d7aaae230666db75e811774dc7638c3f4533984b479d4c12410590 357B / 357B                                                                                                                    43.3s
 => => extracting sha256:95544a631453a086b2ce2748d5e2baf9e753a84324e868d45be42c91f339308b                                                                                                                      5.6s
 => => extracting sha256:1e8721914c900626229a8dec4f5c6627771a75b23bcd3472659024c46ed50b50                                                                                                                      2.9s
 => => extracting sha256:ef4162f8e00399eaed25c9405a957ef3630428ce5c82bf5979505829f0131848                                                                                                                      0.5s
 => => extracting sha256:a1e9706f1a03d5b1ec5812818eab1e3dfb71665a635e410d58c4fb75d06d26e0                                                                                                                      0.0s
 => => extracting sha256:80e142e980d7aaae230666db75e811774dc7638c3f4533984b479d4c12410590                                                                                                                      0.0s
 => [stage-2 2/7] RUN apt-get update && apt-get install wget && rm -rf /var/lib/apt/lists/*                                                                                                                   53.0s
 => [stage-2 3/7] RUN mkdir -p /app /usr/share/jenkins/ref/plugins /usr/share/jenkins/ref/casc /app/bin     && echo "jenkins: {}" >/usr/share/jenkins/ref/casc/jenkins.yaml     && wget https://github.com/je  2.9s
 => [jenkinsfilerunner-build  2/15] RUN apt-get update && apt-get install -y unzip                                                                                                                            56.1s
 => [jenkinsfilerunner-build  3/15] COPY --from=jenkinsfilerunner-mvncache /mavenrepo /mavenrepo                                                                                                               4.5s
 => [jenkinsfilerunner-build  4/15] ADD app /jenkinsfile-runner/app                                                                                                                                            0.1s
 => [jenkinsfilerunner-build  5/15] ADD bootstrap /jenkinsfile-runner/bootstrap                                                                                                                                0.2s
 => [jenkinsfilerunner-build  6/15] ADD payload /jenkinsfile-runner/payload                                                                                                                                    0.1s
 => [jenkinsfilerunner-build  7/15] ADD payload-dependencies /jenkinsfile-runner/payload-dependencies                                                                                                          0.1s
 => [jenkinsfilerunner-build  8/15] ADD setup /jenkinsfile-runner/setup                                                                                                                                        0.1s
 => [jenkinsfilerunner-build  9/15] ADD vanilla-package /jenkinsfile-runner/vanilla-package                                                                                                                    0.1s
 => [jenkinsfilerunner-build 10/15] ADD packaging-parent-resources /jenkinsfile-runner/packaging-parent-resources                                                                                              0.2s
 => [jenkinsfilerunner-build 11/15] ADD packaging-parent-pom /jenkinsfile-runner/packaging-parent-pom                                                                                                          0.1s
 => [jenkinsfilerunner-build 12/15] ADD packaging-slim-parent-pom /jenkinsfile-runner/packaging-slim-parent-pom                                                                                                0.1s
 => [jenkinsfilerunner-build 13/15] ADD pom.xml /jenkinsfile-runner/pom.xml                                                                                                                                    0.2s
 => [jenkinsfilerunner-build 14/15] RUN cd /jenkinsfile-runner && mvn clean package --batch-mode -ntp --show-version --errors                                                                                301.5s
 => [jenkinsfilerunner-build 15/15] RUN mkdir /app && unzip /jenkinsfile-runner/vanilla-package/target/war/jenkins.war -d /app/jenkins &&   rm -rf /app/jenkins/scripts /app/jenkins/jsbundles /app/jenkins/c  5.3s
 => [stage-2 4/7] COPY --from=jenkinsfilerunner-build /app/jenkins /app/jenkins                                                                                                                                0.3s
 => [stage-2 5/7] COPY --from=jenkinsfilerunner-build /jenkinsfile-runner/app/target/appassembler /app                                                                                                         0.1s
 => [stage-2 6/7] COPY --from=jenkinsfilerunner-build /jenkinsfile-runner/vanilla-package/target/plugins /usr/share/jenkins/ref/plugins                                                                        0.5s
 => [stage-2 7/7] COPY /packaging/docker/unix/jenkinsfile-runner-launcher /app/bin                                                                                                                             0.1s
 => exporting to image                                                                                                                                                                                         1.9s
 => => exporting layers                                                                                                                                                                                        1.8s
 => => writing image sha256:18f94e7e2444f8f5dd8c661e88c1ed34aa4eb35986a66b221a26af9abced8687                                                                                                                   0.0s
 => => naming to docker.io/jenkins4eval/jenkinsfile-runner

Validation

$ docker images
REPOSITORY                                                     TAG                     IMAGE ID            CREATED              SIZE
jenkins4eval/jenkinsfile-runner                                latest                  18f94e7e2444        About a minute ago   490MB

Here is the launcher file and we can see the "--plugins" hard codes a dir

#!/bin/sh

if [ -n "$DEBUG" ] ; then
  export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 $JAVA_OPTS"
fi
if [ -n "$JDK_11" ] ; then
  export JAVA_OPTS="--illegal-access=permit $JAVA_OPTS"
fi

# check if the user has provided a path to the file
if [ -z "${JENKINSFILE_PATH}" ] ; then
  if [ -f "/workspace/Jenkinsfile" ] ; then
    JENKINSFILE_PATH="/workspace/Jenkinsfile"
  elif [ -f "/workspace/Jenkinsfile.yml" ] ; then
    JENKINSFILE_PATH="/workspace/Jenkinsfile.yml"
  else
    # Default fallback which delegates discovery to JFR
    JENKINSFILE_PATH=/workspace
  fi
fi

/app/bin/jenkinsfile-runner \
    --jenkins-war /app/jenkins \
    --plugins /usr/share/jenkins/ref/plugins \
    --file ${JENKINSFILE_PATH} \
    --runWorkspace /build \
    "$@"

Let's change the runner to handle a created plugins.txt file

$ git diff
diff --git a/packaging/docker/unix/jenkinsfile-runner-launcher b/packaging/docker/unix/jenkinsfile-runner-launcher
index d6f33bc..63391c4 100755
--- a/packaging/docker/unix/jenkinsfile-runner-launcher
+++ b/packaging/docker/unix/jenkinsfile-runner-launcher
@@ -19,9 +19,19 @@ if [ -z "${JENKINSFILE_PATH}" ] ; then
   fi
 fi

+# check on plugins file set
+if [ -z "${JENKINSPLUGINS}" ] ; then
+  if [ -f "/workspace/plugins.txt" ] ; then
+   JENKINSPLUGINS="/workspace/plugins.txt"
+  else
+   # default set
+   JENKINSPLUGINS="/usr/share/jenkins/ref/plugins"
+  fi
+fi
+
 /app/bin/jenkinsfile-runner \
     --jenkins-war /app/jenkins \
-    --plugins /usr/share/jenkins/ref/plugins \
+    --plugins $(JENKINSPLUGINS} \
     --file ${JENKINSFILE_PATH} \
     --runWorkspace /build \
     "$@"

As you can see we now handle a path or file

$ cat packaging/docker/unix/jenkinsfile-runner-launcher
#!/bin/sh

if [ -n "$DEBUG" ] ; then
  export JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 $JAVA_OPTS"
fi
if [ -n "$JDK_11" ] ; then
  export JAVA_OPTS="--illegal-access=permit $JAVA_OPTS"
fi

# check if the user has provided a path to the file
if [ -z "${JENKINSFILE_PATH}" ] ; then
  if [ -f "/workspace/Jenkinsfile" ] ; then
    JENKINSFILE_PATH="/workspace/Jenkinsfile"
  elif [ -f "/workspace/Jenkinsfile.yml" ] ; then
    JENKINSFILE_PATH="/workspace/Jenkinsfile.yml"
  else
    # Default fallback which delegates discovery to JFR
    JENKINSFILE_PATH=/workspace
  fi
fi

# check on plugins file set
if [ -z "${JENKINSPLUGINS}" ] ; then
  if [ -f "/workspace/plugins.txt" ] ; then
   JENKINSPLUGINS="/workspace/plugins.txt"
  else
   # default set
   JENKINSPLUGINS="/usr/share/jenkins/ref/plugins"
  fi
fi

/app/bin/jenkinsfile-runner \
    --jenkins-war /app/jenkins \
    --plugins $(JENKINSPLUGINS} \
    --file ${JENKINSFILE_PATH} \
    --runWorkspace /build \
    "$@"

Rebuilding

$ docker build -t jenkins4eval/jenkinsfile-runner -f packaging/docker/unix/adoptopenjdk-8-hotspot/Dockerfile .
[+] Building 3.7s (2/5)
 => [internal] load build definition from Dockerfile                                                                                                                                                           0.1s
 => => transferring dockerfile: 38B                                                                                                                                                                            0.0s
 => [internal] load .dockerignore                                                                                                                                                                              0.1s
 => => transferring context: 35B                                                                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/adoptopenjdk:8u262-b10-jdk-hotspot                                                                                                                          3.5s
 => [internal] load metadata for docker.io/jenkins/jenkinsfile-runner:build-mvncache                                                                                                                           3.5s
 => [internal] load metadata for docker.io/library/maven:3.6.3-adoptopenjdk-8

which takes some time

Validation

builder@DESKTOP-JBA79RT:~/Workspaces/jenkinsfile-runner$ docker images | head -n3
REPOSITORY                                                     TAG                     IMAGE ID            CREATED              SIZE
jenkins4eval/jenkinsfile-runner                                latest                  2a731e35f7d8        About a minute ago   490MB
<none>                                                         <none>                  92545da515c4        8 days ago           490MB

Again, a simple Jenkinsfile

$ cat ./helloworld/jenkinsfile
pipeline {
    agent any
    stages {
        stage('Print hello') {
            steps {
                echo 'Hello world!'
            }
        }
    }
}

Validation

$ docker run --rm -v $(pwd)/helloworld/jenkinsfile:/workspace/Jenkinsfile -v /home/builder/Workspaces/jfRunnerDemo/plugins.txt:/workspace/plugins.txt jenkins4eval/jenkinsfile-runner:latest

Downloading jenkins plugin ace-editor (latest)...
Downloading jenkins plugin ant (latest)...
Downloading jenkins plugin antisamy-markup-formatter (latest)...
Downloading jenkins plugin apache-httpcomponents-client-4-api (latest)...
Downloading jenkins plugin authentication-tokens (latest)...
Downloading jenkins plugin block-queued-job (latest)...
Downloading jenkins plugin bootstrap4-api (latest)...
Downloading jenkins plugin bootstrap5-api (latest)...
Downloading jenkins plugin bouncycastle-api (latest)...
Downloading jenkins plugin branch-api (latest)...
Downloading jenkins plugin build-timeout (latest)...
Downloading jenkins plugin caffeine-api (latest)...
Downloading jenkins plugin checks-api (latest)...
Downloading jenkins plugin cloudbees-folder (latest)...
Downloading jenkins plugin configuration-as-code (latest)...
Downloading jenkins plugin credentials-binding (latest)...
Downloading jenkins plugin credentials (latest)...
Downloading jenkins plugin display-url-api (latest)...
Downloading jenkins plugin docker-commons (latest)...
Downloading jenkins plugin docker-workflow (latest)...
Downloading jenkins plugin durable-task (latest)...
Downloading jenkins plugin echarts-api (latest)...
Downloading jenkins plugin email-ext (latest)...
Downloading jenkins plugin external-monitor-job (latest)...
Downloading jenkins plugin favorite (latest)...
Downloading jenkins plugin font-awesome-api (latest)...
Downloading jenkins plugin ghprb (latest)...
Downloading jenkins plugin git-changelog (latest)...
Downloading jenkins plugin git-client (latest)...
Downloading jenkins plugin git-server (latest)...
Downloading jenkins plugin git (latest)...
Downloading jenkins plugin github-api (latest)...
Downloading jenkins plugin github-branch-source (latest)...
Downloading jenkins plugin github-issues (latest)...
Downloading jenkins plugin github-oauth (latest)...
Downloading jenkins plugin github-organization-folder (latest)...
Downloading jenkins plugin github-pr-coverage-status (latest)...
Downloading jenkins plugin github-pullrequest (latest)...
Downloading jenkins plugin github (latest)...
Downloading jenkins plugin gitlab-merge-request-jenkins (latest)...
Downloading jenkins plugin gitlab-oauth (latest)...
Downloading jenkins plugin gitlab-plugin (latest)...
Downloading jenkins plugin google-login (latest)...
Downloading jenkins plugin gradle (latest)...
Downloading jenkins plugin gravatar (latest)...
Downloading jenkins plugin groovy (latest)...
Downloading jenkins plugin handlebars (latest)...
Downloading jenkins plugin icon-shim (latest)...
Downloading jenkins plugin jackson2-api (latest)...
Downloading jenkins plugin javadoc (latest)...
Downloading jenkins plugin jdk-tool (latest)...
Downloading jenkins plugin jjwt-api (latest)...
Downloading jenkins plugin jquery-detached (latest)...
Downloading jenkins plugin jquery3-api (latest)...
Downloading jenkins plugin jsch (latest)...
Downloading jenkins plugin junit (latest)...
Downloading jenkins plugin kerberos-sso (latest)...
Downloading jenkins plugin ldap (latest)...
Downloading jenkins plugin lockable-resources (latest)...
Downloading jenkins plugin mailer (latest)...
Downloading jenkins plugin mapdb-api (latest)...
Downloading jenkins plugin matrix-auth (latest)...
Downloading jenkins plugin matrix-project (latest)...
Downloading jenkins plugin maven-plugin (latest)...
Downloading jenkins plugin mercurial (latest)...
Downloading jenkins plugin metrics (latest)...
Downloading jenkins plugin momentjs (latest)...
Downloading jenkins plugin oauth-credentials (latest)...
Downloading jenkins plugin oic-auth (latest)...
Downloading jenkins plugin okhttp-api (latest)...
Downloading jenkins plugin openid4java (latest)...
Downloading jenkins plugin openid (latest)...
Downloading jenkins plugin openshift-login (latest)...
Downloading jenkins plugin pam-auth (latest)...
Downloading jenkins plugin pipeline-build-step (latest)...
Downloading jenkins plugin pipeline-github-lib (latest)...
Downloading jenkins plugin pipeline-githubnotify-step (latest)...
Downloading jenkins plugin pipeline-graph-analysis (latest)...
Downloading jenkins plugin pipeline-input-step (latest)...
Downloading jenkins plugin pipeline-milestone-step (latest)...
Downloading jenkins plugin pipeline-model-api (latest)...
Downloading jenkins plugin pipeline-model-declarative-agent (latest)...
Downloading jenkins plugin pipeline-model-definition (latest)...
Downloading jenkins plugin pipeline-model-extensions (latest)...
Downloading jenkins plugin pipeline-rest-api (latest)...
Downloading jenkins plugin pipeline-stage-step (latest)...
Downloading jenkins plugin pipeline-stage-tags-metadata (latest)...
Downloading jenkins plugin pipeline-stage-view (latest)...
Downloading jenkins plugin pipeline-utility-steps (latest)...
Downloading jenkins plugin plain-credentials (latest)...
Downloading jenkins plugin plugin-util-api (latest)...
Downloading jenkins plugin popper-api (latest)...
Downloading jenkins plugin popper2-api (latest)...
Downloading jenkins plugin pubsub-light (latest)...
Downloading jenkins plugin resource-disposer (latest)...
Downloading jenkins plugin scm-api (latest)...
Downloading jenkins plugin script-security (latest)...
Downloading jenkins plugin snakeyaml-api (latest)...
Downloading jenkins plugin sse-gateway (latest)...
Downloading jenkins plugin ssh-agent (latest)...
Downloading jenkins plugin ssh-credentials (latest)...
Downloading jenkins plugin ssh-slaves (latest)...
Downloading jenkins plugin sshd (latest)...
Downloading jenkins plugin structs (latest)...
Downloading jenkins plugin subversion (latest)...
Downloading jenkins plugin timestamper (latest)...
Downloading jenkins plugin token-macro (latest)...
Downloading jenkins plugin trilead-api (latest)...
Downloading jenkins plugin url-auth-sso (latest)...
Downloading jenkins plugin variant (latest)...
Downloading jenkins plugin workflow-aggregator (latest)...
Downloading jenkins plugin workflow-api (latest)...
Downloading jenkins plugin workflow-basic-steps (latest)...
Downloading jenkins plugin workflow-cps-global-lib (latest)...
Downloading jenkins plugin workflow-cps (latest)...
Downloading jenkins plugin workflow-durable-task-step (latest)...
Downloading jenkins plugin workflow-job (latest)...
Downloading jenkins plugin workflow-multibranch (latest)...
Downloading jenkins plugin workflow-scm-step (latest)...
Downloading jenkins plugin workflow-step-api (latest)...
Downloading jenkins plugin workflow-support (latest)...
Downloading jenkins plugin ws-cleanup (latest)...
2021-07-22 04:16:45.427+0000 [id=542]   WARNING o.o.server.RealmVerifier#setEnforceRpId: RP discovery / realm validation disabled;
Started
Resume disabled by user, switching to high-performance, low-durability mode.
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /build
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Print hello)
[Pipeline] echo
Hello world!
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline

Setting up an AzDO Pipeline

Let's create a simple example:

azure-pipelines.yml

# JF Runner
 
trigger:
- main
 
pr:
- main
 
pool:
  vmImage: 'ubuntu-latest'
 
stages:
- stage: RunAsBinary
  displayName: Running JFRunner binary
  jobs:
  - job: JFRunner
    steps:
    - script: |
        wget https://github.com/jenkinsci/jenkinsfile-runner/releases/download/1.0-beta-29/jenkinsfile-runner-1.0-beta-29.zip
        unzip jenkinsfile-runner-1.0-beta-29.zip
        chmod u+x ./bin/jenkinsfile-runner
      displayName: 'get JFR binary'
 
    - script: |
        ./bin/jenkinsfile-runner -p ./helloworld/plugins.txt -f ./helloworld/jenkinsfile
      displayName: 'Run JFRunner'

Then we can set up our jenkinsfile and plugins in a helloworld subfolder

$ cat ./helloworld/jenkinsfilepipeline {
    agent any
    stages {
        stage('Print hello') {
            steps {
                echo 'Hello world!'
            }
        }
    }
}

$ cat ./helloworld/plugins.txt
ace-editor:latest
ant:latest
antisamy-markup-formatter:latest
apache-httpcomponents-client-4-api:latest
authentication-tokens:latest
block-queued-job:latest
bootstrap4-api:latest
bootstrap5-api:latest
bouncycastle-api:latest
branch-api:latest
build-timeout:latest
caffeine-api:latest
checks-api:latest
cloudbees-folder:latest
configuration-as-code:latest
credentials-binding:latest
credentials:latest
display-url-api:latest
docker-commons:latest
docker-workflow:latest
durable-task:latest
echarts-api:latest
email-ext:latest
external-monitor-job:latest
favorite:latest
font-awesome-api:latest
ghprb:latest
git-changelog:latest
git-client:latest
git-server:latest
git:latest
github-api:latest
github-branch-source:latest
github-issues:latest
github-oauth:latest
github-organization-folder:latest
github-pr-coverage-status:latest
github-pullrequest:latest
github:latest
gitlab-merge-request-jenkins:latest
gitlab-oauth:latest
gitlab-plugin:latest
google-login:latest
gradle:latest
gravatar:latest
groovy:latest
handlebars:latest
icon-shim:latest
jackson2-api:latest
javadoc:latest
jdk-tool:latest
jjwt-api:latest
jquery-detached:latest
jquery3-api:latest
jsch:latest
junit:latest
kerberos-sso:latest
ldap:latest
lockable-resources:latest
mailer:latest
mapdb-api:latest
matrix-auth:latest
matrix-project:latest
maven-plugin:latest
mercurial:latest
metrics:latest
momentjs:latest
oauth-credentials:latest
oic-auth:latest
okhttp-api:latest
openid4java:latest
openid:latest
openshift-login:latest
pam-auth:latest
pipeline-build-step:latest
pipeline-github-lib:latest
pipeline-githubnotify-step:latest
pipeline-graph-analysis:latest
pipeline-input-step:latest
pipeline-milestone-step:latest
pipeline-model-api:latest
pipeline-model-declarative-agent:latest
pipeline-model-definition:latest
pipeline-model-extensions:latest
pipeline-rest-api:latest
pipeline-stage-step:latest
pipeline-stage-tags-metadata:latest
pipeline-stage-view:latest
pipeline-utility-steps:latest
plain-credentials:latest
plugin-util-api:latest
popper-api:latest
popper2-api:latest
pubsub-light:latest
resource-disposer:latest
scm-api:latest
script-security:latest
snakeyaml-api:latest
sse-gateway:latest
ssh-agent:latest
ssh-credentials:latest
ssh-slaves:latest
sshd:latest
structs:latest
subversion:latest
timestamper:latest
token-macro:latest
trilead-api:latest
url-auth-sso:latest
variant:latest
windows-slaves:latest
workflow-aggregator:latest
workflow-api:latest
workflow-basic-steps:latest
workflow-cps-global-lib:latest
workflow-cps:latest
workflow-durable-task-step:latest
workflow-job:latest
workflow-multibranch:latest
workflow-scm-step:latest
workflow-step-api:latest
workflow-support:latest
ws-cleanup:latest

Saving and adding the YAML pipeline shows it works just fine

Docker Agent based Jenkinsfile Builds in AzDO:

These work just as well

An updated Jenkinsfile:

pipeline {
    agent { docker { image 'maven:3.3.3' } }
    stages {
        stage('build') {
            steps {
                sh 'mvn --version'
            }
        }
    }
}

and see it works just fine

While it did take 4 minutes to pull down a fresh Maven image and run, it still showed we could use a specified containerized agent inline.  From the log pictured above:

2021-07-22T03:27:09.6647984Z $ docker run -t -d -u 1001:121 -w /tmp/jenkinsfileRunner.tmp/jfr17864046138965444461.run/workspace/job -v /tmp/jenkinsfileRunner.tmp/jfr17864046138965444461.run/workspace/job:/tmp/jenkinsfileRunner.tmp/jfr17864046138965444461.run/workspace/job:rw,z -v /tmp/jenkinsfileRunner.tmp/jfr17864046138965444461.run/workspace/job@tmp:/tmp/jenkinsfileRunner.tmp/jfr17864046138965444461.run/workspace/job@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 ******** maven:3.3.3 cat
2021-07-22T03:27:09.6649559Z $ docker top 41db19acef8830de763556b7576b8394e7d736057e912484185bda2be9a9086a -eo pid,comm
2021-07-22T03:27:09.6649864Z [Pipeline] {
2021-07-22T03:27:09.6650064Z [Pipeline] stage
2021-07-22T03:27:09.6650290Z [Pipeline] { (build)
2021-07-22T03:27:09.6650492Z [Pipeline] sh
2021-07-22T03:27:10.6646729Z + mvn --version
2021-07-22T03:27:10.6648790Z Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T11:57:37+00:00)
2021-07-22T03:27:10.6649244Z Maven home: /usr/share/maven
2021-07-22T03:27:10.6649567Z Java version: 1.8.0_91, vendor: Oracle Corporation
2021-07-22T03:27:10.6650044Z Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
2021-07-22T03:27:10.6650517Z Default locale: en, platform encoding: UTF-8
2021-07-22T03:27:10.6651058Z OS name: "linux", version: "5.8.0-1036-azure", arch: "amd64", family: "unix"

Summary

We asked the simple question: How can we quickly build existing Jenkins projects using Azure DevOps with minimal modification?

By using jenkinsfile-runner and a well populated plugins list, we can easily run both containerized agent and non containerized agent jenkinsfile builds with ease.  

This method can be a quick Phase 0 win for any group working to help migrate existing users out of the older Jenkins product into something like Azure DevOps as part of a larger overall migration journey.