-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
36 lines (30 loc) · 1 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
FROM amazoncorretto:11-al2-jdk
ARG BUILDER_UID=9999
ARG DEBIAN_FRONTEND=noninteractive
ARG MAVEN_VERSION=3.9.6
ARG USER_HOME_DIR="/root"
ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries
ENV TZ="Australia"
ENV HOME /home/builder
ENV JAVA_TOOL_OPTIONS -Duser.home=/home/builder
ENV MAVEN_HOME /usr/share/maven
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"
RUN yum install --quiet --assumeyes \
git \
libxml2-utils \
python3 \
python3-pip \
unzip \
wget \
tar
RUN pip3 install \
bump2version==1.0.1
RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
&& curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
&& tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
&& rm -f /tmp/apache-maven.tar.gz \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
RUN useradd --create-home --no-log-init --shell /bin/bash --uid $BUILDER_UID builder
RUN chown builder /home/builder
USER builder
WORKDIR /home/builder