-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
33 lines (25 loc) · 940 Bytes
/
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
FROM java:8-jdk-alpine
MAINTAINER Code Climate
# Increase Java memory limits
ENV JAVA_OPTS="-XX:+UseParNewGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -Xss4096k"
ENV GRADLE_VERSION=4.2.1
ENV GRADLE_HOME=/opt/gradle
ENV GRADLE_FOLDER=$GRADLE_HOME
ENV GRADLE_USER_HOME=$GRADLE_HOME
ENV PATH=$GRADLE_HOME/bin:$PATH
RUN mkdir -p $GRADLE_USER_HOME && \
chmod g+s $GRADLE_USER_HOME && \
apk update && \
apk add --virtual .build-dependencies ca-certificates wget && \
update-ca-certificates && \
wget https://downloads.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip && \
unzip gradle-${GRADLE_VERSION}-bin.zip -d /opt && \
mv /opt/gradle-${GRADLE_VERSION}/* $GRADLE_HOME && \
rm -f gradle-${GRADLE_VERSION}-bin.zip && \
apk del .build-dependencies
WORKDIR /usr/src/app
# Cache dependencies
COPY build.gradle ./
RUN gradle infra
COPY . ./
RUN gradle clean build -x test