-
Notifications
You must be signed in to change notification settings - Fork 789
/
Dockerfile-go-maven
27 lines (21 loc) · 1.01 KB
/
Dockerfile-go-maven
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
# ToDo: Make it work with alpine, not sure why alpine images complain about java not found
FROM golang:1.23.2@sha256:a7f2fc9834049c1f5df787690026a53738e55fc097cd8a4a93faa3e06c67ee32
# Maven
ENV MAVEN_VERSION 3.6.3
ENV M2_HOME /opt/apache-maven-$MAVEN_VERSION
ENV maven.home $M2_HOME
ENV M2 $M2_HOME/bin
ENV PATH $M2:$PATH
ENV JAVA_HOME=/opt/jdk-15.0.1
ENV PATH=$JAVA_HOME/bin:$PATH
ENV JX3_HOME /home/.jx3
ARG VERSION
ARG TARGETARCH
ARG TARGETOS
RUN curl -f -L https://repo1.maven.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar -C /opt -xzv
RUN curl -f -L https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz | tar -C /opt -xzv
RUN echo using jx version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \
mkdir -p /home/.jx3 && \
curl -L https://github.com/jenkins-x/jx/releases/download/v${VERSION}/jx-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \
mv jx /usr/bin
RUN jx upgrade plugins --mandatory