Integrating Docker to an existing Jenkins CD Pipeline


I have an existing Java app which is built using Maven and results in a Jar file being updated in an on-premise Maven repo.

I now want to add a step to create a docker image out of the Jar file, which means that my starting point is a Jar in a repo, rather than some source code in a Maven project.

Ideally I’d like to leave the existing CD pipeline alone, which means that adding the Docker maven plugin isn’t an option. I don’t want a hard dependency on the filesystem, I want to use the repo from inside my Dockerfile.

Any advice on how to tackle this?