-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile
41 lines (30 loc) · 1.57 KB
/
Dockerfile
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
39
40
41
FROM java:8u92-alpine
MAINTAINER Wes Morgan <[email protected]>
ENV LEIN_VERSION=2.6.1
ENV LEIN_INSTALL=/usr/local/bin/
WORKDIR /tmp
# Install real tar as BusyBox's doesn't support --strip-components
RUN apk add --update tar gnupg bash openssl && rm -rf /var/cache/apk/*
# Download the whole repo as an archive
RUN mkdir -p $LEIN_INSTALL \
&& wget -q https://github.com/technomancy/leiningen/archive/$LEIN_VERSION.tar.gz \
&& echo "Comparing archive checksum ..." \
&& echo "f7643a14fd8a4d5c19eeb416db8ea549d8d2c18a *$LEIN_VERSION.tar.gz" | sha1sum -c - \
&& mkdir ./leiningen \
&& tar -xzf $LEIN_VERSION.tar.gz -C ./leiningen/ --strip-components=1 \
&& mv leiningen/bin/lein-pkg $LEIN_INSTALL/lein \
&& rm -rf $LEIN_VERSION.tar.gz ./leiningen \
&& chmod 0755 $LEIN_INSTALL/lein \
# Download and verify Lein stand-alone jar
&& 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 pool.sks-keyservers.net --recv-key 2E708FB2FCECA07FF8184E275A92E04305696D78 \
&& echo "Verifying Jar file signature ..." \
&& gpg --verify leiningen-$LEIN_VERSION-standalone.zip.asc \
# Put the jar where lein script expects
&& 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
RUN lein