forked from CircleCI-Public/cimg-clojure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
32 lines (26 loc) · 1.28 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# vim:set ft=dockerfile:
FROM cimg/%%PARENT%%:%%PARENT_TAG%%
LABEL maintainer="CircleCI Execution Team <[email protected]>"
ENV CLOJURE_VERSION=%%VERSION_FULL%% \
PATH=$JAVA_HOME/bin:$PATH
# Setup the primary install method for Clojure, using CLJ. It unfortunately
# requires the Clojure version as well as the build number (?), thus a
# parameter (param1) is used.
RUN curl -sSL -o clojure-installer.sh "https://github.com/clojure/brew-install/releases/download/%%PARAM1%%/linux-install.sh" && \
chmod +x clojure-installer.sh && \
sudo ./clojure-installer.sh && \
rm clojure-installer.sh
ENV LEIN_VERSION=2.11.2
RUN mkdir -p $HOME/bin && \
# the above line can go in the next base image update
curl -sSL -o $HOME/bin/lein "https://raw.githubusercontent.com/technomancy/leiningen/${LEIN_VERSION}/bin/lein" && \
chmod +x $HOME/bin/lein && \
# Finish lein install & Pre-install Clojure
echo "(defproject dummy \"\" :dependencies [[org.clojure/clojure \"${CLOJURE_VERSION}\"]])" > project.clj && \
lein deps && \
rm -r project.clj target/
# Install tooling
ENV BABASHKA_VERSION=1.3.191
RUN curl -sSL "https://github.com/babashka/babashka/releases/download/v${BABASHKA_VERSION}/babashka-${BABASHKA_VERSION}-linux-amd64-static.tar.gz" \
| sudo tar -xz -C /usr/local/bin/ && \
bb --version