##java8
RUN         apt-get update -y && apt-get install -y \
            software-properties-common
RUN         echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN         add-apt-repository ppa:webupd8team/java -y \
            && apt-get update -y && apt-get install -y \
            oracle-java8-installer \
            oracle-java8-set-default


##jdk7
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:webupd8team/java \
    && echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections \
    && apt-get -y -qq --force-yes update \
    && apt-get -y -qq --force-yes install oracle-java7-installer

##jdk6
RUN \
  echo oracle-java6-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
  add-apt-repository -y ppa:webupd8team/java && \
  apt-get update && \
  apt-get install -y oracle-java6-installer && \
  rm -rf /var/lib/apt/lists/* && \
  rm -rf /var/cache/oracle-jdk6-installer

##maven
ENV    MAVEN_VERSION 3.3.9

# Maven
RUN apt-get install curl
RUN    curl -sSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share && \
    mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven && \
    ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

# Set Appropriate Environmental Variables
ENV    MAVEN_HOME /usr/share/maven
ENV    PATH $PATH:$MAVEN_HOME/bin

##git
RUN apt-get install -y git

##tomcat
RUN apt-get install -y --no-install-recommends unzip && \
    wget  https://www.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.zip -O tomcat.zip && \
    unzip -d /opt tomcat.zip && \
    ln -s /opt/apache-tomcat-8.0.37 /opt/tomcat && \
    chmod +x /opt/tomcat/bin/*.sh && \
    rm tomcat.zip           

## mysql
run apt-get install mysql-server
RUN service mysql start

codecraft
11.9k 声望2k 粉丝

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很自豪告诉世人,我曾经将代码注入生命去打造互联网的浪潮之巅,那是个很疯狂的时代,我在一波波的浪潮上留下...