This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-14
Channels
- # announcements (3)
- # babashka-sci-dev (22)
- # beginners (6)
- # calva (36)
- # cljsrn (1)
- # clojure (59)
- # clojure-europe (31)
- # clojure-france (3)
- # clojure-gamedev (1)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-uk (4)
- # clojurescript (6)
- # conjure (1)
- # cursive (11)
- # data-oriented-programming (1)
- # datahike (2)
- # docker (8)
- # duct (4)
- # emacs (1)
- # figwheel-main (5)
- # kaocha (1)
- # leiningen (8)
- # lsp (64)
- # malli (10)
- # membrane (5)
- # nrepl (11)
- # off-topic (5)
- # portal (6)
- # quil (9)
- # reagent (62)
- # reitit (15)
- # releases (3)
- # ring-swagger (2)
- # shadow-cljs (36)
- # specter (2)
- # tools-deps (21)
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? tools.build/depstar/something else?
Passing environment variables to docker-compose is https://docs.docker.com/compose/environment-variables/ 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