Fork me on GitHub

Hey guys. I haven't worked much with containers, so this might be obvious to some of you. I've created my uberjar, created the image and run everything in docker-compose. However, my application relies on some resources in the uberjar. How do i use those? Right now i get this error: " Caused by: java.lang.IllegalArgumentException: Not a file: jar:file:/app/application-0.0.0-SNAPSHOT-standalone.jar!/json/data" even though this should be the location of these resources.


Can you successfully run the uberjar outside of docker? Seems like you need to add json/data to the classpath but if that were the case the uberjar wouldn't work at all.


Well i actually don't know. I have about 30 environment variables that need to be passed for the system to start up. I can run the main with those variables and it works fine, but i am unsure how i would parse those to the uberjar?


Well, the uberjar is created before you do anything with docker, so if the uberjar doesn't work this isn't a docker-related question. How are you building the uberjar? else?




Passing environment variables to docker-compose is but no matter what you do it won't work if your uberjar is broken. I'm not familiar with leiningen but if I were you I'd focus my efforts there, with help from #leiningen


Alright, thanks a lot. I will try my luck there then 🙂


Maybe i am going about this the wrong way?