forked from hyperhq/jenkins-image-slave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·37 lines (30 loc) · 1.27 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
37
#REFERENCE Image
#jenkinsci/slave:latest
FROM centos:7.2.1511
MAINTAINER Jimmy Xu <[email protected]>
##########################################
## prepare jenkins slave run env ##
##########################################
ENV HOME /home/jenkins
RUN groupadd -g 10000 jenkins
RUN useradd -c "Jenkins user" -d $HOME -u 10000 -g 10000 -m jenkins
RUN mkdir /home/jenkins/.tmp
VOLUME ["/home/jenkins"]
##########################################
## prepare java run env ##
##########################################
#RUN yum update -y
RUN yum install -y wget && yum clean packages
RUN wget --no-check-certificate --no-cookies \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-x64.rpm \
&& rpm -ivh jdk-8u101-linux-x64.rpm && rm -rf jdk-8u101-linux-x64.rpm
# RUN curl -L -O -H "Cookie: oraclelicense=accept-securebackup-cookie" -k \
# https://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-x64.rpm \
# && rpm -ivh jdk-8u101-linux-x64.rpm && rm -rf jdk-8u101-linux-x64.rpm
ENV JAVA_HOME /usr/java/jdk1.8.0_101
ENV PATH $PATH:$JAVA_HOME/bin
##########################################
RUN yum install -y make git which && yum clean packages
WORKDIR $HOME
USER root