I am trying to use an RHEL 5 Docker container to run Jenkins jobs, but RHEL 5 does not support anything more recent than Java 8. Is there a way to run a Jenkins job in this container without using the Jenkins agent to communicate to the Jenkins server? Maybe with SSH?
(Don't ask me why RHEL 5, it just is. I can't change it.)
I figured it out using a declarative pipeline and the docker object. No agent or Java needed. This simple demonstration pipeline works with an RHEL 5.11 container and Jenkins 2.452.1.