Fork me on GitHub

Right now, whenever I add a dependency to build.boot, I have to restart boot to load the dependency. However, if I already have a boot repl at hand, is there a way to "hot inject the new dependency" as well ?


@U3JURM9B6: you can use (boot.core/set-env! :dependencies ...) in a REPL


what's the fastest way nowadays to pull up a virtual server (on aws preferrably) with boot on it out of the box? (so i don't have to wait for the ~/.m2/ directory to be populated and the java distro package installed and other shit like that?) my network connection is fluctuating around 50-200kbyte/s so it takes 5-10 minutes to upload a 26MB war file when im deploying to elastic beanstalk. i thought i would just run the deployments from a virtual server instead


There's a Docker image with Boot/Java installed... maybe that would work?


but this runs boot directly. i would just need a shell so i can git clone my repo and do a boot beanstalk in it


in fact the best would be to have a gitlab runner installed on it too and that would do the deployment for me


so im trying this image but it's still downloading a lot of stuff for me and it's getting not even the latest boot:

λ docker run -i adzerk/boot-clj repl
Unable to find image 'adzerk/boot-clj:latest' locally
latest: Pulling from adzerk/boot-clj
5e7f975cbeeb: Already exists
a3ed95caeb02: Already exists
a3e4bb9953ce: Already exists
32e8c9a8996e: Already exists
Digest: sha256:713f49c833be372227089aed8dbd424e191f18ada924cfad984258c7c463ce6c
Status: Downloaded newer image for adzerk/boot-clj:latest
Downloading ...
Retrieving dynapath-0.2.3.jar from 
Retrieving pod-2.5.5.jar from 
Retrieving shimdandy-impl-1.2.0.jar from 
Retrieving core-2.5.5.jar from 


am i doing something wrong?


@onetom boot bootstraps via 2.5.5


alright, this explained almost everything:


For the record, here is a completely cached boot repl. Just to run repl at least once, so we can cache its deps, like the reply library, we create a little layer on top of the base clojure:boot-alpine image:

$ cat Dockerfile
FROM clojure:boot-alpine
RUN boot repl -e '(System/exit 0)'
Build a new image locally called fast-boot which has all the deps cached:
$ docker build --tag fast-boot .
Sending build context to Docker daemon 2.048 kB
Step 1/2 : FROM clojure:boot-alpine
 ---> 42e752cc3859
Step 2/2 : RUN boot repl -e '(System/exit 0)'
 ---> Using cache
 ---> f244a9153bcc
Successfully built f244a9153bcc
Now let's time a REPL startup! We --name our container as boot-repl. It is based on the previous image --tagged fast-boot. --rm makes sure there is only one container instance is running by the name boot-repl just a reminder: -it means --interactive & --tty
$ time docker run -it --rm --name boot-repl fast-boot boot repl -e '(do (println "Hi!") (System/exit 0))'
nREPL server started on port 45751 on host - 
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
OpenJDK 64-Bit Server VM 1.8.0_121-b13

real	0m7.374s


took an hour to brush up my docker knowledge...


(I ran it on an 4core 8GB RAM instance which costs $40/mo or $0.06/h)