Created
March 20, 2014 19:57
-
-
Save dkowis/9672498 to your computer and use it in GitHub Desktop.
Dockerfile for jenkins JNLP slave
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
# base image | |
FROM centos | |
# slavename variable | |
ENV SLAVENAME derpSlave | |
RUN yum -y install java-1.7.0-openjdk-devel java-1.7.0-openjdk git rpm-build | |
RUN adduser -d /opt/jenkins jenkins | |
# install maven | |
RUN mkdir /opt/maven | |
RUN wget -O /opt/maven-3.2.1.tar.gz http://www.carfab.com/apachesoftware/maven/maven-3/3.2.1/binaries/apache-maven-3.2.1-bin.tar.gz | |
RUN cd /opt && tar -zxf maven-3.2.1.tar.gz | |
RUN rm -rf /opt/maven && mv /opt/apache-maven-3.2.1 /opt/maven | |
# Get the slave jnlp | |
RUN wget -O /opt/jenkins/slave.jar http://jenkinsServer/jnlpJars/slave.jar | |
#start up teh slaev! | |
CMD su - jenkins -c "java -jar /opt/jenkins/slave.jar -slaveLog /opt/jenkins/slaveLog -jnlpUrl http://jenkinsServer/computer/$SLAVENAME/slave-agent.jnlp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment