Dockerizing a maven app that uses oracle-ojdbc: How do you get the driver in there? Dockerizing a maven app that uses oracle-ojdbc: How do you get the driver in there? oracle oracle

Dockerizing a maven app that uses oracle-ojdbc: How do you get the driver in there?


When I try to build using my maven image it fails saying: "Could not find artifact com.oracle:ojdbc14:jar:10.2.0.4.0 in central" which is expected since I have not included the driver anywhere.

You would need to reproduce in your Dockerfile the same setup (same M2_HOME, sans m2/repository settings) as the one which is working on your host (without docker)

You could start your Dockerfile from a maven image, or, as in this Dockerfile, from a jdk image, installing maven yourself, and deploying your missing jar the same way you would on your host.