-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.jdk7.test
38 lines (30 loc) · 1.46 KB
/
Dockerfile.jdk7.test
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
33
34
35
36
37
38
FROM openjdk:7
ENV LEIN_VERSION=2.8.1
ENV LEIN_INSTALL=/usr/local/bin/
WORKDIR /tmp
# Download the whole repo as an archive
RUN mkdir -p $LEIN_INSTALL \
&& wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg \
&& echo "Comparing lein-pkg checksum ..." \
&& echo "019faa5f91a463bf9742c3634ee32fb3db8c47f0 *lein-pkg" | sha1sum -c - \
&& mv lein-pkg $LEIN_INSTALL/lein \
&& chmod 0755 $LEIN_INSTALL/lein \
&& wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.zip \
&& wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.zip.asc \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-key 2B72BF956E23DE5E830D50F6002AF007D1A7CC18 \
&& echo "Verifying Jar file signature ..." \
&& gpg --verify leiningen-$LEIN_VERSION-standalone.zip.asc \
&& rm leiningen-$LEIN_VERSION-standalone.zip.asc \
&& mkdir -p /usr/share/java \
&& mv leiningen-$LEIN_VERSION-standalone.zip /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar
ENV PATH=$PATH:$LEIN_INSTALL
ENV LEIN_ROOT 1
# Install clojure 1.9.0 so users don't have to download it every time
RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.9.0"]])' > project.clj \
&& lein deps && rm project.clj
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY project.clj /usr/src/app/
RUN lein deps
COPY . /usr/src/app
CMD ["lein", "test"]