Skip to content

Commit

Permalink
Rename sample-project -> tramp-sample-project
Browse files Browse the repository at this point in the history
  • Loading branch information
vemv committed Aug 18, 2023
1 parent b6a60f3 commit 9493389
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Use an official Clojure runtime as a parent image
FROM clojure:temurin-17-lein-bullseye

# Set environment variables to non-interactive (this prevents some prompts)
ENV DEBIAN_FRONTEND=noninteractive

# Define environment variable for nREPL port
ENV NREPL_PORT=7888

RUN apt-get update \
Expand All @@ -21,7 +16,6 @@ RUN locale-gen en_US.UTF-8
RUN locale-gen en en_US en_US.UTF-8
RUN dpkg-reconfigure locales

# Set root password
RUN echo 'root:cider' | chpasswd

RUN sed -i 's/^#* *PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
Expand All @@ -31,31 +25,20 @@ RUN sed -i 's/^#* *ChallengeResponseAuthentication .*/ChallengeResponseAuthentic
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

# Expose SSH port
EXPOSE 22

CMD ["/usr/sbin/sshd", "-D"]

# Set the working directory in the docker image
WORKDIR /usr/src/app

# Copy the current directory contents into the directory at /usr/src/app in the image
COPY . /usr/src/app

# Install any needed packages specified in project.clj
RUN lein deps

# Forward all relevant env vars for ssh sessions
RUN echo "export JAVA_HOME=${JAVA_HOME}" >> /root/.bashrc
RUN echo "export LEIN_HOME=${LEIN_HOME}" >> /root/.bashrc
RUN echo "export LEIN_JAVA_CMD=${LEIN_JAVA_CMD}" >> /root/.bashrc
RUN echo "export LEIN_JVM_OPTS=${LEIN_JVM_OPTS}" >> /root/.bashrc
RUN echo "export LEIN_ROOT=${LEIN_ROOT}" >> /root/.bashrc
RUN echo "export NREPL_PORT=${NREPL_PORT}" >> /root/.bashrc
RUN echo "export PATH=${PATH}" >> /root/.bashrc

# Make port 7888 available to the world outside this container (nREPL default port)
#EXPOSE 7888

# Run lein repl when the container launches, on port defined by NREPL_PORT
#CMD ["lein", "repl", ":headless", ":host", "0.0.0.0", ":port", "7888"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/config/basic_config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ In this example, the path `/src` will be translated to the correct path of your
Clojure project on the host machine. And `/root/.m2` to the host's `~/.m2` folder.

You need to run `lein deps` (or `clojure -P`, etc) in the host machine in order for
navigation to fully work, at least once, and then, preferrably, every time your Maven dependencies change.
navigation to fully work, at least once, and then, preferably, every time your Maven dependencies change.
This allows the `.m2` part of `cider-path-translations` to be actually useful.

If you can't or won't do that, you can use TRAMP capabilities (which CIDER supports) instead of
Expand Down

0 comments on commit 9493389

Please sign in to comment.