ubuntu安装各类软件的dockerfile

浏览: 240 发布日期: 2016-09-07 分类: ubuntu

##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

##
RUN mkdir -p /data/appdatas/cat
RUN mkdir -p /data/applogs/cat

##CLONE
RUN git clone https://github.com/dianping/cat.git
RUN cd cat
RUN git checkout mvn-repo
RUN cp -R * ~/.m2/repository

RUN git checkout master
RUN mvn clean install -DskipTests
RUN mvn cat:install
返回顶部