I have a customer who is excited about the idea of Docker containers as Jenkins build nodes, but a few of their pipelines still have dependencies on Java 8. Can a Docker container have Java 11 and Java 8, use 11 to run as an agent but 8 to execute a pipeline?
Sure. You can install java 11 in one location, and use java 8 as default. Something in the line (pseudo file):
Keep in mind, that final container will be ~400MB