Legacy build environment in Docker container, incompatible with Jenkins agent I have a working Dockerfile that creates a build environment for a legacy app, and now I'd like to use that environment from Jenkins, ideally allowing for incremental builds.

The environment is too old to run a recent version of Java, which means it cannot be used as an agent directly.

Is there a way to run a series of build steps inside a container without the container itself running an agent?
According the the Jenkins docs, you could use your custom docker image as the execution environment, assuming the server Jenkins is running on has Docker installed/running. 

pipeline {
    agent {
        docker { image 'your-custom-image' }
    }
    stages {
        stage('Build') {
            steps {
                sh 'commands to run in your docker image here'
            }
        }
    }
}