-
-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discuss] How to let CIDER make use of Clojure docker image? #2552
Comments
I found CIDER has an variable to keep connection records. Could be used in upper mentioned case. Like this: (setq cider-known-endpoints
'(("host-a" "10.10.10.1" "7888")
("host-b" "7888"))) |
|
I use docker-compose and volumes: # docker-compose.yml
version: '3'
volumes:
m2:
gitlibs:
services:
app:
image: clojure:tools-deps-alpine
working_dir: "${PWD}"
command: "true"
ports:
- "4444:4444" # nrepl
- "4445:4445" # http
environment:
- "CLJ_CONFIG=${PWD}/.docker-clojure"
- DATABASE_URL=postgres://postgres:password@db:5432/postgres
- TEST_DATABASE_URL=postgres://postgres:password@test-db:5432/postgres
- PORT=4446
volumes:
- ".:${PWD}:cached" # cached - MacOS option
- m2:/root/.m2
- gitlibs:/root/.gitlibs
links:
- db
- test-db
db: &db
image: postgres:10.4-alpine
environment:
- POSTGRES_PASSWORD=password
test-db:
<<: *db ;; .docker-clojure/deps.edn
{:aliases {:cider {:extra-deps {darkleaf/cider-tools-desp
{:git/url "https://github.com/darkleaf/cider-tools-deps.git"
:sha "1025b510db24b36ab741bc5599e36806eec904ec"}}
:main-opts ["-m" "darkleaf.cider-tools-deps"
"port" "4444" "host" "0.0.0.0"]}
:repl {:extra-deps {darkleaf/repl-tools-deps
{:git/url "https://github.com/darkleaf/repl-tools-deps.git"
:sha "04e128ca67785e4eb7ccaecfdaffa3054442358c"}}
:main-opts ["-m" "darkleaf.repl-tools-deps"]}
:run-tests {:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner.git"
:sha "028a6d41ac9ac5d5c405dfc38e4da6b4cc1255d5"}}
:main-opts ["-m" "cognitect.test-runner"]}
:coverage {:extra-deps {cloverage {:mvn/version "1.0.13"}}
:main-opts ["-m" "cloverage.coverage" "-p" "src" "-s" "test"]}}} I run Dependencies are installed into volumes. So Emacs can't have access to them. |
I'm confused on this. Dependencies are installed into volumes, but Emacs CIDER connect to container started Can Docker access host system's |
We have Maven and tools like Boot and Leiningen, why on earth would Docker be even necessary here? Just because it's trendy? |
REPL is started inside a docker container. This process have access to container file system volumes:
- ".:${PWD}:cached" # cached - MacOS option
- m2:/root/.m2
- gitlibs:/root/.gitlibs
Later I used to mount |
Seems you've sorted this out, so I'll close this ticket. |
This is a discuss, but in order to keep records down, and might help other people. So I record it here. I know there is a channel
#cider/#emacs
on Slack. I will post this link over there.I want to use different version and environment of Clojure. There is an official Clojure Docker image. https://hub.docker.com/_/clojure
I'm thinking how to use Clojure image's binary and REPL in Emacs, and CIDER.
There are some ways can access Docker image as I know:
docker.el
.docker-tramp.el
anddocker.el
to access clojure container binary commands likeclojure
,clj
etc. So that Emacs use them as executable command path. Like CIDER has customize optioncider-clojure-cli-command
. I tried following, but failed.Anyone have suggestion and solution? Welcome to add. (This might could add to Wiki, when the discussion is almost) Thanks for viewing.
The text was updated successfully, but these errors were encountered: