-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathDockerfile
More file actions
86 lines (76 loc) · 2.27 KB
/
Dockerfile
File metadata and controls
86 lines (76 loc) · 2.27 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
FROM eclipse-temurin:25-jdk-noble
CMD ["gradle"]
ENV GRADLE_HOME=/opt/gradle
RUN set -o errexit -o nounset \
&& echo "Renaming ubuntu user and group to gradle" \
&& groupmod --new-name gradle ubuntu \
&& mkdir /home/gradle \
&& usermod --login gradle --home /home/gradle --groups gradle ubuntu \
&& chown gradle /home/gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
&& chmod --recursive o+rwx /home/gradle \
\
&& echo "Symlinking root Gradle cache to gradle Gradle cache" \
&& ln --symbolic /home/gradle/.gradle /root/.gradle
VOLUME /home/gradle/.gradle
WORKDIR /home/gradle
RUN set -o errexit -o nounset \
&& apt-get update \
&& apt-get install --yes --no-install-recommends \
# common utilities
make \
curl \
wget \
tar \
\
# Dockerfile dependencies
unzip \
\
# VCSes
brz \
git \
git-lfs \
mercurial \
openssh-client \
subversion \
&& rm --recursive --force /var/lib/apt/lists/* \
\
&& echo "Testing common utilities" \
&& which awk \
&& which curl \
&& which cut \
&& which grep \
&& which gunzip \
&& which sha256sum \
&& which sed \
&& which tar \
&& which tr \
&& which unzip \
&& which wget \
\
&& echo "Testing VCSes" \
&& which brz \
&& which git \
&& which git-lfs \
&& which hg \
&& which svn
ENV GRADLE_VERSION=9.5.0
ARG GRADLE_DOWNLOAD_SHA256=553c78f50dafcd54d65b9a444649057857469edf836431389695608536d6b746
RUN set -o errexit -o nounset \
&& echo "Downloading Gradle" \
&& wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
\
&& echo "Checking Gradle download hash" \
&& echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \
\
&& echo "Installing Gradle" \
&& unzip gradle.zip \
&& rm gradle.zip \
&& mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \
&& ln --symbolic "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle
USER gradle
RUN set -o errexit -o nounset \
&& echo "Testing Gradle installation" \
&& gradle --stacktrace --debug --version
USER root