Skip to content

Commit

Permalink
(maint) configure lein local-repo for easy caching
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tw1r3 committed Apr 27, 2024
1 parent c543cc6 commit 210924b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ This container assumes that the code you're building will be in `/workspace`. Th
will be copied into `/output` before the container terminates, and if you're building a
custom ezbake that will be cloned into `/ezbake`.

Lein is configured to use `/repo` as it's local-repo. Volume map to cache dependencies between builds.

1. Run from a remotely accessible repo (github, gitlab, etc)

This is by far the fastest build option, but does require the extra step of committing and pushing your code
Expand Down
6 changes: 5 additions & 1 deletion docker/ezbake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ RUN git config --global user.name "Puppet Release Team" && \
git config --global --add safe.directory /workspace && \
git config --global --add safe.directory /ezbak

RUN curl --output /usr/local/bin/lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein && \
# symlink is a work-around for projects not respecting local-repo
RUN mkdir -p /repo /root/.lein && \
mkdir -p /root/.m2 && ln -s /repo /root/.m2/repository && \
echo '{:user {:local-repo "/repo"}}' > /root/.lein/profiles.clj && \
curl --output /usr/local/bin/lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein && \
chmod 0755 /usr/local/bin/lein && \
/usr/local/bin/lein

Expand Down

0 comments on commit 210924b

Please sign in to comment.