Last active
January 20, 2016 18:57
-
-
Save DBassel/3a030a3065da99883635 to your computer and use it in GitHub Desktop.
A dockerfile of gocd-agent JDK8NodeJSMaven
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
# Set the base image to gocd/gocd-server | |
FROM gocd/gocd-agent:latest | |
# File Author / Maintainer | |
# based on ckulka/gocd-agent | |
MAINTAINER Basel Darvish <[email protected]> | |
## BEGIN INSTALLATION | |
# Install Java 8 JDK, Remove Java 7 JRE | |
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections | |
RUN apt-add-repository -y ppa:webupd8team/java && apt-get update && apt-get install -y -q oracle-java8-installer | |
RUN update-java-alternatives -s java-8-oracle && apt-get install -y oracle-java8-set-default | |
RUN apt-get remove -y -q openjdk-7-jre-headless | |
RUN sed -i '/JAVA_HOME/c\JAVA_HOME="/usr/lib/jvm/java-8-oracle"' /etc/default/go-agent | |
# Install Maven3 | |
ENV mavenVersion 3.3.3 | |
RUN curl http://mirror.nexcess.net/apache/maven/maven-3/${mavenVersion}/binaries/apache-maven-${mavenVersion}-bin.tar.gz | tar -xz -C /usr/share | |
RUN ln -s /usr/share/apache-maven-${mavenVersion}/bin/mvn /usr/bin/mvn | |
# Install NodeJS and NPM (installation instructions from https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server) | |
RUN curl -sL https://deb.nodesource.com/setup | sudo bash - | |
RUN sudo apt-get install -y nodejs | |
RUN sudo apt-get install -y build-essential | |
## IMAGE CLEANUP | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment