Last active
November 26, 2018 20:25
-
-
Save ironicbadger/07262684e06b9d3fad76455e74e6ea45 to your computer and use it in GitHub Desktop.
Maven3.2.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM registry.access.redhat.com/openshift3/jenkins-slave-base-rhel7 | |
MAINTAINER Gabe Montero <gmontero@redhat.com> Alex Kretzschmar <alexktz@redhat.com> | |
# Labels consumed by Red Hat build service | |
LABEL com.redhat.component="jenkins-agent-maven-35-rhel7-container" \ | |
name="openshift3/jenkins-agent-maven-35-rhel7" \ | |
version="3.11" \ | |
architecture="x86_64" \ | |
io.k8s.display-name="Jenkins Agent Maven" \ | |
io.k8s.description="The jenkins agent maven image has the maven tools on top of the jenkins slave base image." \ | |
io.openshift.tags="openshift,jenkins,agent,maven" | |
ENV MAVEN_VERSION=3.2.5 \ | |
BASH_ENV=/usr/local/bin/scl_enable \ | |
ENV=/usr/local/bin/scl_enable \ | |
PROMPT_COMMAND=". /usr/local/bin/scl_enable" | |
# Install Maven | |
RUN yum-config-manager --enable rhel-server-rhscl-7-rpms && \ | |
yum-config-manager --enable rhel-server-rhscl-8-rpms && \ | |
yum-config-manager --disable epel >/dev/null || : && \ | |
INSTALL_PKGS="java-1.8.0-openjdk-devel wget" && \ | |
x86_EXTRA_RPMS=$(if [ "$(uname -m)" == "x86_64" ]; then echo -n java-1.8.0-openjdk-devel.i686 ; fi) && \ | |
yum install -y $INSTALL_PKGS $x86_EXTRA_RPMS && \ | |
# have temporarily removed the validation for java to work aroun known rhel 7.5 problem fixed in fedora; jupierce and gmontero are working with | |
# the requisit folks to get that addressed ... will switch back to rpm -V $INSTALL_PKGS when that occurs | |
yum clean all -y && \ | |
mkdir -p $HOME/.m2 | |
RUN wget http://mirrors.gigenet.com/apache/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && \ | |
tar -zxvf apache-maven-${MAVEN_VERSION}-bin.tar.gz -C /usr/local/bin && \ | |
ln -s /usr/local/bin/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/local/bin/mvn | |
# When bash is started non-interactively, to run a shell script, for example it | |
# looks for this variable and source the content of this file. This will enable | |
# the SCL for all scripts without need to do 'scl enable'. | |
ADD contrib/bin/scl_enable /usr/local/bin/scl_enable | |
ADD contrib/bin/configure-agent /usr/local/bin/configure-agent | |
ADD ./contrib/settings.xml $HOME/.m2/ | |
RUN chown -R 1001:0 $HOME && \ | |
chmod -R g+rw $HOME | |
USER 1001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment