Run
docker-compose -f clj-dev/docker-compose.yaml run --entrypoint "/bin/bash" clojure
Inside the container, run
root@bxyz:/usr/local/app# make run
{:some "data"}
To get a REPL, run
root@xyz:/usr/local/app# clj
Clojure 1.11.1
user=> (require 'main) ; or (require 'main :reload)
; or (require 'main :reload-all) after you've made some changes
nil
user=> (main/read-json "data.json")
{:some "data"}
Use ctrl+d
or ctrl+d
to exit from the Clojure REPL and then ctrl+d
or type exit
to exit from the docker container.
In the host system, figure out how to obtain the ip address of the running docker container.
Inside the container, run
root@xyz:/usr/local/app# make nrepl
In the host system in your VSCode
- REPL
- Connect to a running REPL in your project
- Generic
- <ipaddress>:47481
- Generic
- Connect to a running REPL in your project
VoilĂ !
To rebuild the container after a change in deps.edn
or Makefile
use
docker-compose -f clj-dev/docker-compose.yaml build clojure