Skip to content

Instantly share code, notes, and snippets.

@DBassel
Last active January 20, 2016 18:57
Show Gist options
  • Save DBassel/3a030a3065da99883635 to your computer and use it in GitHub Desktop.
Save DBassel/3a030a3065da99883635 to your computer and use it in GitHub Desktop.

Revisions

  1. DBassel revised this gist Jan 20, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Dockerfile gocd-agent JDK8 NODEJS
    Original file line number Diff line number Diff line change
    @@ -22,8 +22,8 @@ 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 nodejs
    RUN sudo apt-get install build-essential
    RUN sudo apt-get install -y nodejs
    RUN sudo apt-get install -y build-essential

    ## IMAGE CLEANUP

  2. DBassel created this gist Jan 20, 2016.
    30 changes: 30 additions & 0 deletions Dockerfile gocd-agent JDK8 NODEJS
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    # 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 nodejs
    RUN sudo apt-get install build-essential

    ## IMAGE CLEANUP

    RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*